In article <33f40372-13fb-4d52-921d-8ab00685c...@q30g2000prq.googlegroups.com>,
Sean DiZazzo wrote:
>
>Why is it that you can setattr() on an instance of a class that
>inherits from "object", but you can't on an instance of "object"
>itself?
>
o = object()
setattr(o, "x", 1000)
>Traceba
Ahmad Syukri b wrote:
> On Mar 16, 1:21 pm, Sean DiZazzo wrote:
>> Why is it that you can setattr() on an instance of a class that
>> inherits from "object", but you can't on an instance of "object"
>> itself?
>>
>> >>> o = object()
>> >>> setattr(o, "x", 1000)
>>
>> Traceback (most recent call
On Mar 16, 1:21 pm, Sean DiZazzo wrote:
> Why is it that you can setattr() on an instance of a class that
> inherits from "object", but you can't on an instance of "object"
> itself?
>
> >>> o = object()
> >>> setattr(o, "x", 1000)
>
> Traceback (most recent call last):
> File "", line 1, in
>