[issue3563] fix_idioms.py generates bad code

Armin Ronacher report at bugs.python.org
Mon Dec 8 12:39:51 CET 2008


Armin Ronacher <armin.ronacher at active-4.com> added the comment:

I would drop the prefix in that case or attach it to the sorted() call.

So from this code:

    x = foo()
    # perform sorting
    x.sort()

to

    # perform sorting
    x = sorted(foo())

Makes more sense than sticking it after the sorted() call like it
happens currently.  This should also fix the problem with outdented
statements such as except/finally.

----------
nosy: +aronacher

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


More information about the Python-bugs-list mailing list