Message146844
I’ve updated my patch to handle modules and functions too, but there is a decision to make. The functions of built-in modules are implemented by methodobject.c, not functionobject.c (that’s for Python functions), so if we want str(sys.exc_info) to be equal to 'exc_info', then we’ll have str(dict.update) == 'update'. Is this okay?
The patch needs a review.
- I tried using PyUnicode_FromString(name) instead of PyUnicode_FromFormat("%U", name), just like in Python I would use str(x) instead of '%s' % x, but this caused segfaults. Is there a simpler function to use?
- I’ve used copy-paste-tweak and checked the results; I’m still learning C and know very little about Python’s types and refcounting internals, so review mercilessly! I forgot to run the tests in findleaks mode, so I’m doing it right now. |
|
Date |
User |
Action |
Args |
2011-11-02 16:31:12 | eric.araujo | set | recipients:
+ eric.araujo, gvanrossum, vstinner, ezio.melotti |
2011-11-02 16:31:12 | eric.araujo | set | messageid: <1320251472.15.0.803496603612.issue13224@psf.upfronthosting.co.za> |
2011-11-02 16:31:11 | eric.araujo | link | issue13224 messages |
2011-11-02 16:31:11 | eric.araujo | create | |
|