diff options
author | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2008-06-09 11:58:51 +0200 |
---|---|---|
committer | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2008-06-09 11:58:51 +0200 |
commit | 76947cf728e906c6f235dddfdab78677b9ba96b9 (patch) | |
tree | 9c4d6594349cbe1a3ee240c3d9482f8642e71431 | |
parent | 45e2ceacb6c4ce95da5a71b64d63496f6d68b558 (diff) | |
parent | 6835bcf049c4e9ee568b8763a8e146b314f9d573 (diff) | |
download | logilab-common-76947cf728e906c6f235dddfdab78677b9ba96b9.tar.gz |
merge
-rw-r--r-- | bind.py | 4 | ||||
-rw-r--r-- | logger.py | 4 | ||||
-rw-r--r-- | patricia.py | 4 | ||||
-rw-r--r-- | tree.py | 3 |
4 files changed, 9 insertions, 6 deletions
@@ -19,8 +19,8 @@ """ from warnings import warn -warn('bind module is deprecated and will disappear in a near release', - DeprecationWarning, stacklevel=1) +warn('logilab.common.bind module is deprecated and will disappear in a near release', + DeprecationWarning, stacklevel=2) __revision__ = '$Id: bind.py,v 1.8 2005-11-22 13:12:59 syt Exp $' @@ -18,9 +18,9 @@ everything on stdout, the other using syslog. """ from warnings import warn -warn('logger module is deprecated and will disappear in a future release. \ +warn('logilab.common.logger module is deprecated and will disappear in a future release. \ use logging module instead.', - DeprecationWarning, stacklevel=1) + DeprecationWarning, stacklevel=2) __revision__ = "$Id: logger.py,v 1.18 2006-02-03 14:17:42 adim Exp $" diff --git a/patricia.py b/patricia.py index 23c6cd7..6b62feb 100644 --- a/patricia.py +++ b/patricia.py @@ -27,8 +27,8 @@ TODO: _ advanced search """ from warnings import warn -warn('this module is deprecated and will disappear in a near release', - DeprecationWarning, stacklevel=1) +warn('logilab.common.patricia module is deprecated and will disappear in a near release', + DeprecationWarning, stacklevel=2) __revision__ = "$Id: patricia.py,v 1.5 2003-10-31 14:18:32 syt Exp $" @@ -43,6 +43,9 @@ class Node(object): self.parent = None self.children = [] + def __iter__(self): + return iter(self.children) + def __str__(self, indent=0): s = ['%s%s %s' % (' '*indent, self.__class__.__name__, self.id)] indent += 2 |