Type checking in python?

paul at prescod.net.bbs paul at prescod.net.bbs
Mon Jul 17 17:30:03 EDT 2000


Matthew Cline wrote:
>
> ....
>
> That's another reason why I'd like the type checking to be done by the
> Python compiler, because it could be intelligent about those things.
> Like for "list" it could accept a tuple, a list, or anything derived
> from UserList.

Most list-like Python objects do not derive from UserList. We could
argue whether they should or should not but the point is that your
syntactic change would only provide maximum benefit if Python
programmers change their programming style. That's why it is not
something that can be implemented overnight.

--
 Paul Prescod - Not encumbered by corporate consensus
It's difficult to extract sense from strings, but they're the only
communication coin we can count on.
	- http://www.cs.yale.edu/~perlis-alan/quotes.html



More information about the Python-list mailing list