Python complaints

Alternative Fluffy gerglery at usa.net
Thu Dec 16 06:20:33 EST 1999


Charles Boncelet <boncelet at udel.edu> wrote:


[...]

> If Python is a typeless language,

Python is not a typeless language, it's a dynamically typed language.
the distinction might seem small, but it does explain all the points
that are troubling you in how functions behave.

> then shouldn't all functions make a reasonable effort at promotion
> to try to do something reasonable? (E.g., the Numeric ufuncs
> generally do this correctly.)

There are places where the documentation could be more precise, and
Fred Drake does make frequent appeals for contributions toward that
end.

That said, it would not be a great idea to go overboard with
verbosity, since there do from time to time arrive new types (a recent
example being buffer objects) that start working with older functions
and methods.  Then the complaints move to "how come function x works
on buffers, but the docs say it's only for strings?"  Damned if you
do, damned if you don't.

> If Python is a typed language, shouldn't we be able to determine 
> what types are allowed as arguments and returned from functions 
> without experimentation (and reverse engineering from the source code)?

Yeah, and you're not alone in thinking that. See the Types SIG archive
on Python.org and the meta-SIG where the reasons for its proposed
retirement was recently discussed for an overview of the problem,
possible solutions and the general pain-in-the-buttness of it all.



More information about the Python-list mailing list