summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Yves David <pierre-yves.david@logilab.fr>2008-06-09 11:58:51 +0200
committerPierre-Yves David <pierre-yves.david@logilab.fr>2008-06-09 11:58:51 +0200
commit76947cf728e906c6f235dddfdab78677b9ba96b9 (patch)
tree9c4d6594349cbe1a3ee240c3d9482f8642e71431
parent45e2ceacb6c4ce95da5a71b64d63496f6d68b558 (diff)
parent6835bcf049c4e9ee568b8763a8e146b314f9d573 (diff)
downloadlogilab-common-76947cf728e906c6f235dddfdab78677b9ba96b9.tar.gz
merge
-rw-r--r--bind.py4
-rw-r--r--logger.py4
-rw-r--r--patricia.py4
-rw-r--r--tree.py3
4 files changed, 9 insertions, 6 deletions
diff --git a/bind.py b/bind.py
index 36ff771..a130c5b 100644
--- a/bind.py
+++ b/bind.py
@@ -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 $'
diff --git a/logger.py b/logger.py
index 3b190fa..f5ea4bd 100644
--- a/logger.py
+++ b/logger.py
@@ -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 $"
diff --git a/tree.py b/tree.py
index 4fcb6c6..d8cfffe 100644
--- a/tree.py
+++ b/tree.py
@@ -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