Python types

Ben Finney bignose+hates-spam at benfinney.id.au
Fri Mar 24 23:19:08 CET 2006


"Salvatore" <salvatore.didio at wanadoo.fr> writes:

> 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?

You're right. All Python values are strongly typed; they don't, in
general, change their type; and operations between values of
mismatched types are not allowed.

A more recent distinction than "strong" vs "weak" typing, is "dynamic"
vs "static" typing.

    "Typing: Strong vs. Weak, Static vs. Dynamic"
    <URL:http://www.artima.com/weblogs/viewpost.jsp?thread=7590>

-- 
 \      "I would rather be exposed to the inconveniences attending too |
  `\     much liberty than those attending too small a degree of it."  |
_o__)                                              -- Thomas Jefferson |
Ben Finney




More information about the Python-list mailing list