python bug?
Anthony Petropoulos
apetrop at gmail.com
Mon Jul 26 09:21:51 EDT 2004
More information about the Python-list mailing list
Mon Jul 26 09:21:51 EDT 2004
- Previous message (by thread): python bug?
- Next message (by thread): python bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
When running this simple code:
-------
class Dada:
a = []
def __init__(self, arg):
self.a.append(arg)
d1 = Dada("pro")
d2 = Dada("hoho")
print d1.a, d2.a
------------
I get the output ['pro', 'hoho'] ['pro', 'hoho'], instead of what I
expected: ['pro'] ['hoho'].
Is this a feature? Is there something I'm missing?
Anthony Petropoulos
- Previous message (by thread): python bug?
- Next message (by thread): python bug?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list