Permalink
Browse files

Implement Tree.__len__.

  • Loading branch information...
jelmer committed Jul 23, 2009
1 parent 8a15645 commit 6044fe5f254819a8599d9584f2fcad4b11b9c6b1
Showing with 3 additions and 0 deletions.
  1. +3 −0 dulwich/objects.py
View
@@ -428,6 +428,9 @@ def __delitem__(self, name):
del self._entries[name]
self._needs_serialization = True
+ def __len__(self):
+ return len(self._entries)
+
def add(self, mode, name, hexsha):
assert type(mode) == int
assert type(name) == str

0 comments on commit 6044fe5

Please sign in to comment.