The right way to 'call' a class attribute inside the same class

Gregory Ewing greg.ewing at
Mon Dec 12 16:30:47 EST 2016

Ned Batchelder wrote:
> In C++, you don't have an object of type T until the
> constructor has finished. In Python, you have an object of type T before
> __init__ has been entered.

That distinction seems a bit pedantic as well. Inside a C++
constructor you have access to something having all the
fields and methods of an object of type T, they just
haven't been filled in yet.

It's a bit like asking at what point between conception and
birth a baby starts to exist.


More information about the Python-list mailing list