more on weak typing..
Greg Ewing
see_reply_address at something.invalid
Tue Sep 24 22:25:07 EDT 2002
Lance wrote:
>
> dynamically typed language
> A language in which types are discovered at execution time; the opposite
> of statically typed. VBScript and Python are dynamically typed, because they
> figure out what type a variable is when you first assign it a value.
That's not quite accurate. In most dynamically-typed languages,
variables don't have types *at all*; types are associated with
values, not variables. If you took the above statement literally,
you might think that once you had assigned something of a given
type to a variable, you couldn't assign something of a different
type to it later -- which is obviously not true of Python (or
Lisp, or Scheme, or Smalltalk, or any other d-t language I can
think of!)
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list