[stdlib-sig] proposed removal: the types module

M.-A. Lemburg mal at egenix.com
Fri Apr 4 12:00:08 CEST 2008

On 2008-04-04 11:23, Christian Heimes wrote:
> Barry Warsaw schrieb:
>> On Apr 3, 2008, at 11:09 AM, M.-A. Lemburg wrote:
>>> The idea to spread type objects across several different modules
>>> is just not practical.
>>> If you want to test for built-in types that are used by the interpreter,
>>> then you want to look in *one central place* for the type object - not
>>> in a gazillion different modules.
>> Exactly right.
> Which is exactly what my patch http://bugs.python.org/issue1605
> implements, isn't it? And what was rejected by Guido.

He gave his -1, we have Barry's, your and my +1 ... that's a net
+2 so far.

His argument that "they should be each be exposed in a a module
(new or existing) that defines other objects (types, functions,
constants, what have you) with a related purpose." results in
the problems I mentioned earlier.

The "related purpose" part is a very fuzzy term and it's not at all
clear where to look for type objects for things that can be used
in multiple contexts.

Also note that the reason for putting the type objects all in one
module is not to "lump them all together", but instead to make the
type object lookup process intuitive and straight forward for
the programmer.

As an example from real life: if you're looking for an apple,
you'd normally go to the local market or supermarket, instead
of trying to find an apple tree where you could pick one.

As compromise, perhaps we should just expose the type objects in
multiple places, ie. in the types module and add aliases to whatever
other modules they seem to fit.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Apr 04 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