author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Tue, 26 Jan 2010 10:23:38 +0100 | |
changeset 4351 | 619c7f9302fc |
parent 4350 | 9ad697216604 |
child 4352 | afe1f9bc308a |
--- a/mixins.py Tue Jan 26 10:22:48 2010 +0100 +++ b/mixins.py Tue Jan 26 10:23:38 2010 +0100 @@ -98,7 +98,7 @@ path.reverse() return path - def iterparents(self): + def iterparents(self, strict=True): def _uptoroot(self): curr = self while True: @@ -106,6 +106,8 @@ if curr is None: break yield curr + if not strict: + return chain([self], _uptoroot(self)) return _uptoroot(self) def notification_references(self, view):