What is the semantics meaning of 'object'?

Ian Kelly ian.g.kelly at gmail.com
Sun Jun 23 00:27:10 EDT 2013


On Sat, Jun 22, 2013 at 9:20 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> * on the down side, automatic delegation of special double-underscore
> methods like __getitem__ and __str__ doesn't work with new-style classes.

I actually consider that an up side.  Sure it's inconvenient that you
can't delegate all such methods at once just by overriding
__getattribute__, but it would be more troublesome to *accidentally*
implement such methods because you implemented __getattribute__.  And
then there are methods that really should not be delegated in the
first place, like __del__.



More information about the Python-list mailing list