PEP 285: Adding a bool type

Christian Tanzer tanzer at swing.co.at
Tue Apr 9 03:05:30 EDT 2002


jacob at boris.cd.chalmers.se.cd.chalmers.se (Jacob Hallen) wrote:

> In article <3CAF524F.63E46C81 at alcyone.com>,
> Erik Max Francis  <max at alcyone.com> wrote:
> >Jacob Hallen wrote:
> >
> >> Python is a language that is weakly typed, ...
> >
> >You mean dynamically typed, not weakly typed.
>
> I have been brought up in an environment which called anything
> allowing mixed types in a list weakly typed.

By this reasoning all object-oriented languages would be called weakly
typed. Possible but not very helpful (and decidedly non-standard).

> If you prefer to call it dynamically typed, I don't mind.

There are several dimensions to typing, including:

- static vs. dynamic

- strong vs. weak

Python's typing is dynamic and strong. Calling it weakly typed
lumps it together with languages like Perl. I would argue that
Python's typing is stronger than for instance C++'s.

Another important point with typing is whether typing applies to
variables or to objects. In Python, objects are (strongly) typed, not
variables. Thinking `variable` when considering typing (or objects in
general) will not work very well in Python.

Names-don't-matter-except-when-they-do-ly yr's

-- 
Christian Tanzer                                         tanzer at swing.co.at
Glasauergasse 32                                       Tel: +43 1 876 62 36
A-1130 Vienna, Austria                                 Fax: +43 1 877 66 92






More information about the Python-list mailing list