Chris Angelico added the comment:

I've applied all the changes my script can find, including ones that are 
actually quite inappropriate, like:

    try:
        some_function_call()
    except some_exception:
        some_other_function_call()

All tests pass except for one, which I don't fully understand. Attaching 
patches:

1) make_stuff_work.diff - what it says on the tin. I don't understand 
everything that's going on in there, but the build process made some changes to 
tracked files.

2) churn1.diff - mostly-plausible edits. They're unnecessary code churn, and 
shouldn't be done wholesale like this, but they make the obvious changes.

3) churn2.diff - less plausible edits, in the two-expression form shown above. 
These definitely shouldn't be done... but they don't break any of the tests, so 
they're a reasonable proof that the concept works.

4) broken.diff - for some reason that I don't understand, this causes a test 
failure. Something that's supposed to produce no output now produces a warning. 
I cannot figure out how there's a difference in there. Advice please?

The broken one is of the inappropriate type, but the fact that it doesn't work 
seems... indicative, somehow. Indicative of what, I don't know, and it's 8AM 
after I've been up all night, so I'm not going to try further to figure this 
out.

----------
Added file: http://bugs.python.org/file34249/make_stuff_work.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20739>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to