Skip to content

Turtle parser accepts literal subjects, which is invalid RDF #1389

@miguelvaara

Description

@miguelvaara

While running a script including this kind of loop,

for s, p, o in g.triples((None, None, skos.Concept)):
  some code

..an accidentally added literal as a subject is surprisingly allowed (originally from the loaded turtle formatted file). None as a subject can read types (in this case literals) outside the standard. An assumption is that it is the parser that allows non-standard subject types.

Python: 3.6.9
RDFLib: 5.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions