[Python-checkins] python/dist/src/Lib inspect.py,1.47.8.1,1.47.8.2
doko at users.sourceforge.net
doko at users.sourceforge.net
Sun Aug 15 19:16:28 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22377/Lib
Modified Files:
Tag: release23-maint
inspect.py
Log Message:
- Bug #891637, patch #1005466: fix inspect.getargs() crash on def foo((bar)).
Index: inspect.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/inspect.py,v
retrieving revision 1.47.8.1
retrieving revision 1.47.8.2
diff -C2 -d -r1.47.8.1 -r1.47.8.2
*** inspect.py 5 Jun 2004 14:14:48 -0000 1.47.8.1
--- inspect.py 15 Aug 2004 17:16:25 -0000 1.47.8.2
***************
*** 622,633 ****
elif opname == 'STORE_FAST':
stack.append(names[value])
! remain[-1] = remain[-1] - 1
! while remain[-1] == 0:
! remain.pop()
! size = count.pop()
! stack[-size:] = [stack[-size:]]
! if not remain: break
remain[-1] = remain[-1] - 1
! if not remain: break
args[i] = stack[0]
--- 622,641 ----
elif opname == 'STORE_FAST':
stack.append(names[value])
!
! # Special case for sublists of length 1: def foo((bar))
! # doesn't generate the UNPACK_TUPLE bytecode, so if
! # `remain` is empty here, we have such a sublist.
! if not remain:
! stack[0] = [stack[0]]
! break
! else:
remain[-1] = remain[-1] - 1
! while remain[-1] == 0:
! remain.pop()
! size = count.pop()
! stack[-size:] = [stack[-size:]]
! if not remain: break
! remain[-1] = remain[-1] - 1
! if not remain: break
args[i] = stack[0]
More information about the Python-checkins
mailing list