A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026346.html below:

Type Names in the types Module

[Python-Dev] PEP 294: Type Names in the types Module [Python-Dev] PEP 294: Type Names in the types ModuleGuido van Rossum guido@python.org
Fri, 12 Jul 2002 11:51:27 -0400
> > If we need a place to name types that don't deserve being builtins,
> > perhaps new.py is a better place?
> 
> The new. prefix is natural enough for 
> 
> 	m = new.module('name')
> 
> type but it looks pretty awkward in 
> 
> 	if isinstance(obj, new.generator):
> 
> What's the meaning of 'new' in this context?

Sometimes you ask too many questions. :-)

Let's just say that this is a historically available name.  I don't
expect that isinstance(obj, generator) is a very common question to
ask, so I don't mind if you have to ask it in a somewhat awkward way.

> The idea of using the types module turned out to have more problems than 
> appeared at first but new doesn't look much better to me.

Using new.py looks much better to me because it already works.

--Guido van Rossum (home page: http://www.python.org/~guido/)




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