[issue7615] unicode_escape codec does not escape quotes

R. David Murray report at bugs.python.org
Thu Jan 7 14:02:08 CET 2010


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

Does the last patch obsolete the first two?  If so please delete the obsolete ones.

I imagine there are might be small doc updates required, as well.

I haven't looked at the patch itself, but concerning your test patch:  your try/except style is unnecessary, I think.  Better to just let the syntax error bubble up on its own.  After all, you don't *know* that the SyntaxError is because the quotes aren't escaped.  I've run into other unit tests in the test suite where the author made such an assumption, which turned out to be false and confused me for a bit while debugging the failure.  I had to remove the code producing the mistaken reason message in order to see the real problem.  So it's better to just let the real error show up in the first place, in my experience.

----------
nosy: +r.david.murray
stage: test needed -> patch review

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


More information about the Python-bugs-list mailing list