Message183210
| Author |
dlam |
| Recipients |
dlam, docs@python, eli.bendersky, ezio.melotti, serhiy.storchaka, tshepang |
| Date |
2013年02月28日.10:19:51 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1362046795.22.0.933095701968.issue16954@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
here's an updated patch incorporating the feedback from Ezio and Eric:
- moved docstrings put in some __special__ method names
- made the description of 'tag' consistent: 'tag' means the elements name (as opposed to 'tag' being a synonym for "element"!)
- docstring args now *stared* as opposed to 'quoted'
I also gave a shot at copying the existing docstrings into their respective C counterparts. But it *seems* like you can't do so
that easily for a C extension. Maybe I missed something though:
>>> from _elementtree import Element as cElement
>>> cElement.__doc__ = 'foobarbaz'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: can't set attributes of built-in/extension type 'xml.etree.ElementTree.Element'
I see one example in Modules/_json.c where the docstrings were sorta copied and pasted over, so perhaps it's an ok thing to do. |
|