[Python-Dev] constant/enum type in stdlib

Antoine Pitrou solipsis at pitrou.net
Tue Nov 23 18:37:40 CET 2010


Le mardi 23 novembre 2010 à 12:32 -0500, Isaac Morland a écrit :
> On Tue, 23 Nov 2010, Antoine Pitrou wrote:
> 
> > We already have a bunch of bizarrely unrelated stuff in collections
> > (such as Callable), so we could put enum there too.
> 
> Why not just "enum" (i.e., "from enum import [...]" or "import 
> enum.[...]")?  Enumerations are one of the basic kinds of types overall 
> (speaking informally and independent of any specific language) - they 
> aren't at all exotic.

Enumerations aren't a type at all (they have no distinguishing
property).

> And "Flat is better than nested", after all.

Not when it means creating a separate module for every micro-feature.

Regards

Antoine.




More information about the Python-Dev mailing list