Redirecting discussion from python-checkins to python-dev. 'new' has now been deprecated for 3.0, GvR suggested it would be nice to get rid of 'types' as well. Christian Heimes wrote: > Georg Brandl wrote: >> I've just looked, and the types you can't get trivially via builtin or >> type(singleton) are >> >> * module >> * function >> * generator >> * code >> * method >> * builtin-function-or-method >> * frame >> * traceback >> * dictproxy >> * getset- and member-descriptor >> >> Where would one put them? > > Python 3.0 has several more types that aren't exposed through types. For > example the views like dict_keys, dict_values and dict_items are not in > types. Most of those 'hard-to-get-at' types are tied pretty tightly to the interpreter internals, and would fit in with Guido's suggestion of a 'pyvm' module. Such a module would let us clean up the 'sys' namespace a little bit by moving some of the more arcane hackery to another module (like the recursion limit and the threading check interval). The only ones I would suggest putting elsewhere are the module type (exposing it through the imp module instead), and the new dict_keys/_values/_items types (exposing them through the collections module, as others have suggested). Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4