Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal sets language and datatype if made with other literal #2603

Open
WhiteGobo opened this issue Sep 25, 2023 · 1 comment
Open

Literal sets language and datatype if made with other literal #2603

WhiteGobo opened this issue Sep 25, 2023 · 1 comment

Comments

@WhiteGobo
Copy link
Contributor

Normally language and datatype cant be set at the same time. This fails in this case:

from rdflib import *
L1 = Literal("example", datatype=XSD.string)
L2 = Literal(L1, lang="en")
print(repr(L2))
# rdflib.term.Literal('example', lang='en', datatype=rdflib.term.URIRef('http://www.w3.org/2001/XMLSchema#string'))

In comparison setting it by hand Literal("example", lang="en", datatype=XSD.string) will result in an error.

@WhiteGobo
Copy link
Contributor Author

This issue might be solved with #2460
It is related to #1326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant