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([
On Monday 19 June 2006 20:55, Rob Cowie wrote:
> Hi all,
>
> Is there a simple way to call every method of an object from its
> __init__()?
>
> For example, given the following class, what would I replace the
> comment line in __init__() with to result in both methods being called?
> I understand t
On 20/06/2006 5:55 AM, Rob Cowie wrote:
> Hi all,
>
> Is there a simple way to call every method of an object from its
> __init__()?
>
> For example, given the following class, what would I replace the
> comment line in __init__() with to result in both methods being called?
> I understand that I
Rob Cowie wrote:
> Hi all,
>
> Is there a simple way to call every method of an object from its
> __init__()?
>
> For example, given the following class, what would I replace the
> comment line in __init__() with to result in both methods being called?
> I understand that I could just call each me
Rob Cowie wrote:
> class Foo(object):
> def __init__(self):
> #call all methods here
> def test(self):
> print 'The test method'
> def hello(self):
> print 'Hello user'
class Foo(object):
def __init__(self):
for k in dir(self) :
if not k.
> Is there a simple way to call every method of an object from its
> __init__()?
>
> For example, given the following class, what would I replace the
> comment line in __init__() with to result in both methods being called?
> I understand that I could just call each method by name but I'm looking
Hi all,
Is there a simple way to call every method of an object from its
__init__()?
For example, given the following class, what would I replace the
comment line in __init__() with to result in both methods being called?
I understand that I could just call each method by name but I'm looking
for