yams #242339 [schema] provide a .relation(role) method [in-progress]
Will help avoid the nasty pattern: for role in ('subject', 'object'): for rschema in getattr(eschema, '%s_relations' % role)(): pass | |
priority | normal |
---|---|
type | enhancement |
done in | <not specified> |
closed by | <not specified> |
patch | [schema] add a .relations(role) method [in-progress] |
Comments
-
2015/02/04 06:28, written by sthenault
add comment-1 on this. The example given in the commit message is already possible in the API, using
On this topic, I would rather introduce new APIs that return RelationDefinition instead of RelationSchema/targets as the legacy API does.