Static Typing in Python

JCM joshway_without_spam at myway.com
Mon Mar 15 13:01:17 EST 2004


Peter Hickman <peter at semantico.com> wrote:
> Jacek Generowicz wrote:
>> Peter Hickman <peter at semantico.com> writes:
>> I have read it before. I still disagree with the implication that
>> Python is weakly typed just much as I did when I first read it.
>> 
>> But you are ignoring my explanation of how Python is strongly typed,
>> and of the distinction between strong-vs-weak and dynamic-vs-static
>> typing, and are instead resorting to argument from authority:

> Right. I should listen to you because you are an authority on Typing but 
> ignore Guido van Rossum.

There's some disagreement, but most often I hear these terms used as
Jacek describes.  Weak typing generally refers to the ability to
reinterpret the data representation at runtime.  For example, in C:

  double x = 10.3;
  int i = *(int*)&x;

Most would call Python strongly, dynamically typed.



More information about the Python-list mailing list