What is the semantics meaning of 'object'?

Ian Kelly ian.g.kelly at gmail.com
Mon Jun 24 13:23:53 EDT 2013


On Mon, Jun 24, 2013 at 9:00 AM, Rotwang <sg552 at hotmail.co.uk> wrote:
> On 24/06/2013 07:31, Steven D'Aprano wrote:
>
>> I daresay that there are good reasons why new-style classes don't do the
>> same thing, but the point is that had the Python devs had been
>> sufficiently interested in keeping the old behaviour, and willing to pay
>> whatever costs that would require, they could have done so.
>
>
> Sure, though the above behaviour was probably easier to achieve with
> old-style classes than it would have been with new-style classes because all
> instances of old-style classes have the same type. But I don't doubt that
> you're correct that they could have done it if they wanted.

It seems to me that the important difference with new-style classes is
that they suddenly have metaclasses and are themselves just ordinary
objects, and so it is important that they consistently resolve calls
in the same way that all other objects do.



More information about the Python-list mailing list