Al Sweigart added the comment:

I've updated the patch.

I've removed the EditorWindow deletion. Importing that and using it as a class 
variable instead of using an assignment statement wasn't picked up. (Is there a 
more opaque way to do this import?)

I've left the RemoteDebugger.py change in. The frame variable name is 
(confusingly) reused:

        frame = frametable[fid]
        # ...cut for brevity...
        stack, i = self.idb.get_stack(frame, tb)
        stack = [(wrap_frame(frame), k) for frame, k in stack]

Changed to:

        # ...cut for brevity...
        stack, i = self.idb.get_stack(frametable[fid], tb)
        stack = [(wrap_frame(frame), k) for frame, k in stack]


The first use of frame is eliminated by simply using frametable[fid] instead. 
The second use is as the temporary variable inside the list comprehension, 
which means the "frame" name is reused. With this change, the only time the 
frame local variable is used is in the list comprehension. This gets rid of the 
name reuse and makes it a bit simpler.

----------
Added file: http://bugs.python.org/file37651/idle_unused_patch2.diff

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

Reply via email to