Dale Strickland-Clark wrote:
> Python 2.4.2 (#1, Oct 13 2006, 17:11:24)
>>>> a = object()
>>>> a.spam = 1
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> AttributeError: 'object' object has no attribute 'spam'
>>>> class B(object): pass
>>>> a = B()
>>>> a.spam = 1
>>>>
> 
> What is subclassing adding to the class here? Why can't I assign to
> attributes of an instance of object?

object itself doesn't have a __dict__ slot, so that very small objects
(such as points) can be built without that overhead.

--Scott David Daniels
[EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to