This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author isandler
Recipients
Date 2005-07-31.00:33:27
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=971153


I changed bdb.py to print the kind of event it receives as
well as as line numbers and here is a session which
illustrates the bug...

 bagira:~/python/dist/src/bug-next1248119> cat t
 #../python
 y=[1,2,3,4]
 x=[ i+1 for i in y]
 print x
 bagira:~/python/dist/src/bug-next1248119> ../python -m pdb t
 event: call; line 1, file <string>
 event: line; line 1, file <string>
 event: call; line 2, file t
 event: line; line 2, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(2)?()
 -> y=[1,2,3,4]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) n
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]
 (Pdb) 
 event: line; line 3, file t
 > /home/ilya/python/dist/src/bug-next1248119/t(3)?()
 -> x=[ i+1 for i in y]

So it appears that the interpreter generates "line" events
for every iteration of the loop..

Would this be a bug in the interpreter (and not in pdb/bdb)?


History
Date User Action Args
2008-01-20 09:58:01adminlinkissue1248119 messages
2008-01-20 09:58:01admincreate