noro wrote:
> great that is what i looked for.
Hmmm... Not quite sure
class C:
>> ... def function(self, arg):
>> ... print arg
>> ...
>> >>> obj = C()
>> >>> d = C.__dict__
>> >>> d['function'](obj, 42)
>> 42
>
> this allows me the access the same method in a range of object
great that is what i looked for.
>>> class C:
> ... def function(self, arg):
> ... print arg
> ...
> >>> obj = C()
> >>> d = C.__dict__
> >>> d['function'](obj, 42)
> 42
this allows me the access the same method in a range of objects.
i can put all the functions i need in a dictio
At Wednesday 30/8/2006 10:35, noro wrote:
for a certain class:
by some way create a dictionary that look somthing like that:
d= {'function one': , \
'function two': , \
'function three': }
and so i could access every method of instances of C, such as obj with
sometiing like:
(i kno
noro wrote:
> Is it possible to do the following:
>
> for a certain class:
>
>
> class C:
>
> def func1(self):
> pass
> def func2(self):
> pass
> def func4(self):
> pass
>
> obj=C()
>
>
> by some w
noro wrote:
> Is it possible to do the following:
>
> for a certain class:
>
>
> class C:
>
> def func1(self):
> pass
> def func2(self):
> pass
> def func4(self):
> pass
>
> obj=C()
>
>
> by some w
noro wrote:
> Is it possible to do the following:
>
> for a certain class:
[...]
> by some way create a dictionary that look somthing like that:
>
> d= {'function one': , \
> 'function two': , \
> 'function three': }
>
> and so i could access every method of instances of C
Something l
On 30 Aug 2006 06:35:17 -0700
"noro" <[EMAIL PROTECTED]> wrote:
> Is it possible to do the following:
>
> for a certain class:
>
>
> class C:
>
> def func1(self):
> pass
> def func2(self):
> pass
> def func4(self):
> pass
>
>
Is it possible to do the following:
for a certain class:
class C:
def func1(self):
pass
def func2(self):
pass
def func4(self):
pass
obj=C()
by some way create a dictionary that look somthing like t