On 22/11/2010 16:24, Antoine Pitrou wrote: > On Mon, 22 Nov 2010 17:08:36 +0100 > Hrvoje Niksic<hrvoje.niksic at avl.com> wrote: >> On 11/22/2010 04:37 PM, Antoine Pitrou wrote: >>> +1. The problem with int constants is that the int gets printed, not >>> the name, when you dump them for debugging purposes :) >> Well, it's trivial to subclass int to something with a nicer __repr__. >> PyGTK uses that technique for wrapping C enums: > Nice. It might be useful to add a private _Constant class somewhere for > stdlib purposes. Why not just solve the problem properly and add it to the standard library... (Allowing for flag enums too that can be or'd together and still have a decent repr.) Michael > Regards > > Antoine. > > > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk -- http://www.voidspace.org.uk/ READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.
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