python-guide icon indicating copy to clipboard operation
python-guide copied to clipboard

Add class attribute to common gotchas

Open variable opened this issue 8 years ago • 1 comments

such as

class A(object):
    data = {}

>>> a = A()
>>> a.data.update({'a': 1})
>>> b = A()
>>> print b.data
{'a': 1}

variable avatar Aug 24 '15 02:08 variable

please mention that in which file to add attribute?

adsnjhfyeqw231eas avatar Oct 28 '15 03:10 adsnjhfyeqw231eas