[Python-ideas] Trial balloon: adding variable type declarations in support of PEP 484

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Aug 4 02:11:37 EDT 2016


Guido van Rossum wrote:
> Which is why I proposed that you can
> make it a class variable by saying `hitpoints: class int = 50`, and
> the default would be for it to be an instance variable.

What about class variables that serve as defaults
for instance variables? Would you be required to
declare it twice in that case?

-- 
Greg



More information about the Python-ideas mailing list