[Python-Dev] removing the new and types modules
Terry Reedy
tjreedy at udel.edu
Thu Nov 29 23:05:37 CET 2007
"Nick Coghlan" <ncoghlan at gmail.com> wrote in message
news:474E995B.5050503 at gmail.com...
| henning.vonbargen at arcor.de wrote:
| > Sorry if this is a dumb question, but are there actually good reasons
to remove "types"?
|
| Mainly because it is an unrelated grab bag of types that could be put in
| more topical locations - what they're for is more interesting than the
| mere fact that they happen to be types.
An additional answer is that a number of changes in the 2.x series have
have the types modules more or less obsolete.
1. It was once intended, I believe,to be a more or less complete catalog of
types. As the number of internal implementation types have increased (and
changed from release to release), this goal has become more difficult and
less sensible.
2. The type-class unification that started in 2.2 unified several type
objects with their corresponding (builtin) constructors (which became the
__call__ methods of the type objects). This mades the type objects that
most people are most interested in directly accessible as builtins.
"type(o) == str" did not work when 'str' was a just conversion function
rather than the string type object!
tjr
More information about the Python-Dev
mailing list