[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 (original) (raw)
Hrvoje Niksic hrvoje.niksic at avl.com
Mon Nov 22 17:08:36 CET 2010
- Previous message: [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
- Next message: [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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:
gtk.PREVIEW_GRAYSCALE isinstance(gtk.PREVIEW_GRAYSCALE, int) True gtk.PREVIEW_GRAYSCALE + 0 1
- Previous message: [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
- Next message: [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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]