[issue6488] ElementTree documentation refers to "path" with no explanation, and inconsistently

R. David Murray report at bugs.python.org
Mon Mar 29 00:14:22 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

I think you are incorrect about the comma after element.  Without the comma 'the first matching element or the default value' are tightly bound, meaning that if either of those is true, then the default value is returned.  That's obviously incorrect, so a human will parse the sentence the way you expect.  But I think technically the comma after element turns the sentence into two independent clauses conjoined by 'or', so that either the first matching element is returned, or the default is returned (if no element was found).  I think it also reads better rhythmically (you will note that I used a comma in my sentence, as well, even though in that case no technical ambiguity results from leaving it out).

The comma in the other sentence I think is optional, and I agree that it reads better without it.

----------
nosy: +r.david.murray

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6488>
_______________________________________


More information about the Python-bugs-list mailing list