there is no use-case of comparing a Literal with None (I think) by FlorianLudwig · Pull Request #1155 · RDFLib/rdflib (original) (raw)
We discussed the merits of storing None
vs False
when parsing an invalid xsd:boolean
literal. Technically both are wrong, but we need to choose one or the other (or throw an exception), and all literals must follow consistent rules.
However, that is not related to this Issue/PR.
The only thing I can see this is a maybe problem here is the possibility of breaking Literal Total Ordering. Given that feature is only concerned with comparing Literals
with Literals
, this change is probably fine.
As @white-gecko said, this is a breaking change. Users with code which expects Literal(1) > None
to evaluate to True
will now get a NotImplemented
object/type returned. That will be a weird bug to hunt down for those poor people. Would it be better to actually throw a NotImplementedError()
instead?