Calling every method of an object from __init__

bruno at modulix onurb at xiludom.gro
Tue Jun 20 08:16:21 EDT 2006


Tim Chase wrote:
(snip)

>>>> class Foo(object):
> ...     def __init__(self):
> ...             for method in dir(self):
> ...                     if method == method.strip("_"):
                          if not method.startswith('_'):

-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list