[Python-Dev] [Python-checkins] r86633 - in python/branches/py3k: Doc/library/inspect.rst Doc/whatsnew/3.2.rst Lib/inspect.py Lib/test/test_inspect.py Misc/NEWS
Michael Foord
fuzzyman at voidspace.org.uk
Mon Nov 22 17:58:56 CET 2010
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.
More information about the Python-Dev
mailing list