##// END OF EJS Templates
manifest: add __nonzero__ method...
Durham Goode -
r30331:b19291e5 default
parent child Browse files
Show More
@@ -422,6 +422,11 b' class manifestdict(object):'
422 def __len__(self):
422 def __len__(self):
423 return len(self._lm)
423 return len(self._lm)
424
424
425 def __nonzero__(self):
426 # nonzero is covered by the __len__ function, but implementing it here
427 # makes it easier for extensions to override.
428 return len(self._lm) != 0
429
425 def __setitem__(self, key, node):
430 def __setitem__(self, key, node):
426 self._lm[key] = node, self.flags(key, '')
431 self._lm[key] = node, self.flags(key, '')
427
432
General Comments 0
You need to be logged in to leave comments. Login now