On Sun, Feb 24, 2013 at 2:27 AM, Eli Bendersky <eli...@gmail.com> wrote: > Any suggestions for places in the stdlib where enums could come useful will > be most welcome
For named values in general: - 0, 1, 2 as file descriptors (stdin/stdout/stderr) - 0, 1, 2 as relative seek locations (start, current, end, but I forget the exact mapping) - results of inspect.getgeneratorstate() (currently strings) - decimal rounding modes (currently strings) - opcodes - as a building block to simplify other parts of the dis module - HTML error codes I expect there would be many more possibilities if you dove into particular file formats and protocols. The reason I like named values as a starting point is that they can act primarily as the original type, while still being a useful building block for an enum type added later, as well as for any custom enum types created when people don't want quite the same structural behaviour at the higher level. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com