Is Python strongly typed?

This is a link to an interesting SO discussion on what strong typing and dynamic typing mean, at least in the context of Python. A few quotes:

  • Python is strongly, dynamically typed.
  • Strong typing means that the type of a value doesn't change in unexpected ways. A string containing only digits doesn't magically become a number, as may happen in Perl. Every change of type requires an explicit conversion.
  • Dynamic typing means that runtime objects (values) have a type, as opposed to static typing where variables have a type.

And then later these comments:

  • Weak typing means allowing access to the underlying representation.
  • Most languages today aren't quite as weak as C and Lisp were, but many of them are still somewhat leaky.
  • Finally, there's another, completely orthogonal, definition of "strong" vs. "weak" typing, where "strong" means powerful/flexible/expressive.

See that link for more information.