[ python-Bugs-1754456 ] "yield" causes strange behaviour

SourceForge.net noreply at sourceforge.net
Sun Jul 15 23:17:25 CEST 2007


Bugs item #1754456, was opened at 2007-07-16 00:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1754456&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Miki Tebeka (tebeka)
Assigned to: Nobody/Anonymous (nobody)
Summary: "yield" causes strange behaviour

Initial Comment:
Running the attached files produces:
ONE PASS

However if you uncomment line 46 and run the file again, you don't get any output.

A pdb session of the file produces:
[mtebeka at lakshmi:python-bug - 14:14] $pdb yield.py 
> /home/mtebeka/work/python-bug/yield.py(3)<module>()
-> from imaplib import IMAP4
(Pdb) b 72
Breakpoint 1 at /home/mtebeka/work/python-bug/yield.py:72
(Pdb) c
> /home/mtebeka/work/python-bug/yield.py(72)main()
-> one_pass()
(Pdb) s
--Call--
/usr/local/lib/python2.5/bdb.py:318: RuntimeWarning: tp_compare didn't return -1 or -2 for exception
  i = max(0, len(stack) - 1)
The program finished and will be restarted
> /home/mtebeka/work/python-bug/yield.py(3)<module>()
-> from imaplib import IMAP4
(Pdb) q
[mtebeka at lakshmi:python-bug - 14:15] $

(Sorry for the length of the example, this is the smaller version that still reproduces the bug)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1754456&group_id=5470


More information about the Python-bugs-list mailing list