Message146844
| Author |
eric.araujo |
| Recipients |
eric.araujo, ezio.melotti, gvanrossum, vstinner |
| Date |
2011年11月02日.16:31:10 |
| SpamBayes Score |
1.2854834e-10 |
| Marked as misclassified |
No |
| Message-id |
<1320251472.15.0.803496603612.issue13224@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|