[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as (original) (raw)

Ethan Furman ethan at stoneleaf.us
Wed Feb 27 00:38:44 CET 2013


On 02/26/2013 03:26 PM, Greg Ewing wrote:

Ethan Furman wrote:

In the first three examples the data in quotes is the doc string; in examples 4 and 5 the RHS is the actual value assigned. What if you want to assign both values and docstrings?

Let the bike shedding begin, eh? ;)

It could be as simple as

name = (0, 'customers full legal name')

or as complex as

 name = enum(value=0, doc="customer's full legal name", xyz='some other attribute')

-- Ethan



More information about the Python-Dev mailing list