Added a convienence method __len__ for cursors; you can remove if you don't like
svn: r12912
This commit is contained in:
parent
2343bb9da5
commit
dd1f4f0b26
@ -106,6 +106,12 @@ class GrampsCursor(object):
|
||||
"""
|
||||
return self.source.stat()['ndata']
|
||||
|
||||
def __len__(self):
|
||||
"""
|
||||
Convienence method to work with len(cursor).
|
||||
"""
|
||||
return self.get_length()
|
||||
|
||||
def __iter__(self):
|
||||
"""
|
||||
Iterator
|
||||
|
Loading…
Reference in New Issue
Block a user