equal
deleted
inserted
replaced
44 description |
44 description |
45 """ |
45 """ |
46 # type doesn't accept unicode name |
46 # type doesn't accept unicode name |
47 # return type.__new__(type, str(clsname), (cls,), {}) |
47 # return type.__new__(type, str(clsname), (cls,), {}) |
48 # __autogenerated__ attribute is just a marker |
48 # __autogenerated__ attribute is just a marker |
49 return type(str(clsname), (cls,), {'__autogenerated__': True}) |
49 return type(str(clsname), (cls,), {'__autogenerated__': True, |
50 |
50 '__doc__': cls.__doc__, |
51 |
51 '__module__': cls.__module__}) |
52 |
52 |
53 |
53 |
54 # use networkX instead ? |
54 # use networkX instead ? |
55 # http://networkx.lanl.gov/reference/algorithms.traversal.html#module-networkx.algorithms.traversal.astar |
55 # http://networkx.lanl.gov/reference/algorithms.traversal.html#module-networkx.algorithms.traversal.astar |
56 def transitive_closure_of(entity, relname, _seen=None): |
56 def transitive_closure_of(entity, relname, _seen=None): |