[stdlib-sig] proposed removal: the types module

M.-A. Lemburg mal at egenix.com
Thu Apr 3 13:39:42 CEST 2008


On 2008-04-03 13:24, Brett Cannon wrote:
> You can just call 'type' on something to get the type needed. 

Well, yes, but that's just what the types module does, isn't it ?

It's really just a more practical way of getting at the type
object than having to create a temporary object just to get
at the type object.

For basic types you don't need it (e.g. int, float, str, etc.),
but there are quite a few types in Python that don't have a
builtin constructor, e.g. methods, modules, instances, etc.

I also don't know how a 2to3 tool would handle such a removal.
It would have to remove the "import types" or "from types import
BuiltinMethodType", then add helper code to get at the type object and
then use the generated code in all places that need the type
object.

-1 on removing it, since it would not help in any way.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Apr 03 2008)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::


    eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
     D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
            Registered at Amtsgericht Duesseldorf: HRB 46611


More information about the stdlib-sig mailing list