enum in Python

David M. Cook davecook at nowhere.net
Mon Sep 8 17:56:11 EDT 2003


In article <KF67b.33$fd2.25 at newssvr23.news.prodigy.com>, Andrew Chalk wrote:

> As a rank Python beginner I've used a dictionary, but presumably there is a
> better way.

I've seen idioms like 

FOO, BAR, BAZ = range(3)

used.

Dave Cook




More information about the Python-list mailing list