Adds len() to relation
Returns the cardinality
This commit is contained in:
parent
d05c2e2d3c
commit
01dc9391d1
@ -382,6 +382,9 @@ class relation (object):
|
|||||||
# comparing content
|
# comparing content
|
||||||
return self.content == other.content
|
return self.content == other.content
|
||||||
|
|
||||||
|
def __len__(self):
|
||||||
|
return len(self.content)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
'''Returns a string representation of the relation, can be printed with
|
'''Returns a string representation of the relation, can be printed with
|
||||||
monospaced fonts'''
|
monospaced fonts'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user