# HG changeset patch # User Sylvain Thénault # Date 1264497818 -3600 # Node ID 619c7f9302fc5c48899484e9a93d329604c9178d # Parent 9ad69721660417981b1d67cc2ef441e1a8e8c6c8 get back iterparents implementation from folder cubes diff -r 9ad697216604 -r 619c7f9302fc mixins.py --- 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):