On Tue, 23 Nov 2010, Bill Janssen wrote: > The main purpose of that is to be able to catch type mismatches with > static typing, though. Seems kind of pointless for Python. The concept can work dynamically. In fact, the flufl.enum package which has been discussed here makes each enumeration into a separate class so many of the advantages of catching type mismatches are obtained. >> Hey, how about this syntax: >> >> enum Colors: >> red = 0 >> green = 10 >> blue > > Why not > > class Color: > red = (255, 0, 0) > green = (0, 255, 0) > blue = (0, 0, 255) > > Seems to handle the situation OK. Yes, this looks almost exactly like flufl.enum syntax. In any case my suggestion of a new keyword was not meant to be taken seriously. If I ever think I have a good reason to suggest a new keyword I'll sleep on it, take a vacation, and then if I still think a new keyword is justified I will specifically disclaim any possibility of the suggestion being a joke. Isaac Morland CSCF Web Guru DC 2554C, x36650 WWW Software Specialist
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