[Python-Dev] PEP 294: Type Names in the types Module
Fredrik Lundh
fredrik@pythonware.com
Tue, 25 Jun 2002 08:27:41 +0200
Oren Tirosh wrote:
> > What would writing
> >
> > isinstance(obj, types.int)
> >
> > ever gain you except restricting execution to 2.3+?
>
> It's like asking what do you gain by using string methods instead of the
> string module.
no, it's not. it's not like that at all.
as michael pointed out, we've already added a *third* way to access
type objects in 2.2. you're adding a *fourth* way.
string methods were added at a time when Python went from one to
two different string types; they solved a real implementation problem.
reducing/eliminating the need for the string module was a side effect.
> It's part of a slow, long-term effort to clean up the language
> while trying to minimize the impact on existing code.
or as likely, part of a slow, long-term effort by to make Python
totally unusable for any serious software engineering...
"who cares about timtowtdi? we add a new one every week!"
"we know what's better for you. you don't."
"deprecation guaranteed!"
(etc)