Why not 3.__class__ ?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Wed Sep 26 00:44:26 CEST 2001

Tue, 25 Sep 2001 15:22:54 -0500, Skip Montanaro <skip at pobox.com> pisze:

> The float type will be subclassable in the future (if not already today in
> 2.2a3), at which point floating point numbers could indeed have attributes
> that begin with the letter 'e' or even an attribute named 'e17'.

Their subclasses could have attributes, but not floats or ints.
Since 3 makes an int, not an instance of a subclass of int, it doesn't
have such an attribute. Unless builtin type objects become mutable
and you can add methods to them...

 __("<  Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
  ^^                      SYGNATURA ZASTĘPCZA

More information about the Python-list mailing list