On Mon, Nov 8, 2010 at 10:33 PM, Antoine Pitrou <solip...@pitrou.net> wrote: > I personally don't care whether we deny non-breaking spaces or not. I > see no reason to deny them, since the cause of the test_trace failure > was ultimately a bug in the trace module, and the non-breaking space > actually uncovered this bug (isn't uncovering bugs a good thing?). The > interpreter has no problem with utf-8 characters in source files, and I > guess most humans have no problems reading non-breaking spaces either.
Indeed, the problem with automating this particular test is that it is ill-specified. Assuming we decided to change reindent.py (or added some other checker) to reject unexpected characters: - what characters are disallowed? - are those characters also disallowed in string literals? - what about source files that are specifically designed to test handling of those characters in particular contexts? Non-breaking spaces are legal in utf-8 encoded Python source files. While including them accidentally is less than ideal, it is perfectly valid to include them deliberately. Trying to design an automated check that can make a reasonable guess at intent is going to require far more effort than is needed. Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ python-committers mailing list python-committers@python.org http://mail.python.org/mailman/listinfo/python-committers