On Feb 23, 2:05 pm, Peter Otten <__pete...@web.de> wrote:
> Marc Aymerich wrote:
> > Hi,
>
> > I'm playing a bit with python dynamic methods and I came up with a
> > scenario that I don't understant. Considering the follow code:
>
> > # Declare a dummy class
> > class A(object):
> > pass
>
> >
Marc Aymerich wrote:
> Hi,
>
> I'm playing a bit with python dynamic methods and I came up with a
> scenario that I don't understant. Considering the follow code:
>
> # Declare a dummy class
> class A(object):
> pass
>
> # generate a dynamic method and insert it to A class
> for name in ['a
Hi,
I'm playing a bit with python dynamic methods and I came up with a
scenario that I don't understant. Considering the follow code:
# Declare a dummy class
class A(object):
pass
# generate a dynamic method and insert it to A class
for name in ['a', 'b', 'c']:
if name == 'b':
@p