Ob#
- class discopy.cat.Ob(name='')[source]#
-
An object with a string as
name.- Parameters:
name (str) – The name of the object.
Example
>>> x, x_, y = Ob('x'), Ob('x'), Ob('y') >>> assert x == x_ and x != y
- to_tree()[source]#
Serialise a DisCoPy object, see
dumps().Example
>>> Ob('x').to_tree() {'factory': 'cat.Ob', 'name': 'x'}
- Return type:
dict