Marko Rauhamaa wrote: > Expanding #3: > > >>> o = object() > >>> o.x = 3 > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > AttributeError: 'object' object has no attribute 'x' > > Why?
There are two intended uses for object and its instances: - as the base class for all other classes; - instances can be used as featureless sentinel objects where only identity matters. If you need instances which carry state, then object is the wrong class. -- Steven -- https://mail.python.org/mailman/listinfo/python-list