[stdlib-sig] proposed removal: the types module

Benjamin Peterson musiccomposition at gmail.com
Thu Apr 3 14:49:23 CEST 2008


On Thu, Apr 3, 2008 at 7:12 AM, Barry Warsaw <barry at python.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Apr 3, 2008, at 8:08 AM, Christian Heimes wrote:
> > Barry Warsaw schrieb:
> >> Plus, there are a few types in there that are difficult or impossible
> >> to get from Python.
> >>
> >> -1 unless you can find another place to stash such types.
> >
> > ModuleType -> imp.module
> > exception related types -> traceback module
> > Function, method and code types -> sys module
> > remaining stuff -> inspect

+1 for removing. I agree with Guido. Types should be with their associated
functionality and not in some arbitrary module.

I think the above example is good is good except for dumping all the
interpreter stuff into sys. sys is already clogged with tons of low-level,
interpreter specific functions. What we need is a new module: interpreter
(or something). I want to move all those functions like _getframe,
getrefcount, get/setrecursionlimit, etc from sys there. FrameType,
CodeType... will also fit nicely in there.

Also, I think the ListType, DictType, and SetType should go into
collections.

>
>
> Actually, inspect.types might be a good place to put them all.
>
> - -Barry
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (Darwin)
>
> iQCVAwUBR/TJo3EjvBPtnXfVAQJDygQAmoXKq99jeRB5K6O4mVyPkErrbZCi2K72
> Kh4mKC65UmGv+GhhUQTlO96e87xKh1p29kS/ajILGDoBfj62WVJ/ZxkEivrSN9ge
> Gw6PmA6HbsP/UUArreLsIOcVDeLEw9Zwfb4m/aQqycJM206DfvLwAhLerLaBYaPm
> qzhOIG3hS7E=
> =qCy8
> -----END PGP SIGNATURE-----
> _______________________________________________
> stdlib-sig mailing list
> stdlib-sig at python.org
> http://mail.python.org/mailman/listinfo/stdlib-sig
>



-- 
Cheers,
Benjamin Peterson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/stdlib-sig/attachments/20080403/1c3e06a0/attachment.htm 


More information about the stdlib-sig mailing list