Python types

sjdevnull at sjdevnull at
Fri Mar 24 23:32:40 CET 2006

Salvatore wrote:
> Hello,
> I've read several articles where it's said that Python is weakly typed.
> I'm a little surprised. All objects seem to have a perfectly defined
> type
> Am i wrong?

No, you're right.  It seems like a lot of people conflate weak vs.
strong typing and static vs. dynamic typing.  Back when I was in CS
classes in the early 1990s, the distinction was pretty universal, but
in recent years it seems like more people are wrongly assuming that
strong typing and static typing go hand in hand.

C, C++: Weakly, statically typed
Java, ML: Strongly, statically typed.
VB, tcl (kind of): Weakly, dynamically typed
Smalltalk, Python: Strongly, dynamically typed

Note that both axes are continuums.  C++ is mostly statically typed,
but it's got rtti and other runtime typing facilities.  Java is pretty
strongly typed, but not to the degree that ML is.

More information about the Python-list mailing list