strong/weak - dynamic/static [Was: Getting started]

Alex Martelli aleax at
Thu Sep 19 17:43:48 CEST 2002

Terry Reedy wrote:
>>explaining or defining the concepts of ... dynamic and static typing.
> Python objects are typed at creation.  Is that dynamic or static?  I'm

Judge for yourself:

>>> class X(object): pass
>>> class Y(object): pass
>>> x = X()
>>> type(x)
<class '__main__.X'>
>>> x.__class__ = Y
>>> type(x)
<class '__main__.Y'>

If you find a way to name this behavior "static", you'll be well
placed for the yearly Humpty Dumpty award.


More information about the Python-list mailing list