[Python-ideas] Enums

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Aug 20 02:31:44 CEST 2011


Spectral One wrote:

> def Box:
>     def SetMake( new_make:enum(pcmake)=ibm ):
 >
> b.SetMake(apple) #Works fine

How do you propose to implement this?

Currently, function arguments are evaluated without any
knowledge of the function to which they are going to be
passed. To what extent would you change that, and how?

-- 
Greg



More information about the Python-ideas mailing list