Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #43396
| Path | csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'correct.': 0.07; 'problem:': 0.07; 'python3': 0.07; 'subject:bug': 0.07; 'subject:skip:b 10': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'def': 0.12; '(pdb)': 0.16; 'kern': 0.16; 'pdb': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'underlying': 0.16; 'when,': 0.16; 'windows:': 0.16; 'wrote:': 0.18; 'stack': 0.19; 'thu,': 0.19; 'import': 0.22; 'header:User-Agent:1': 0.23; 'interpret': 0.24; 'stick': 0.24; 'permission': 0.26; 'second': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'robert': 0.30; 'file': 0.32; 'run': 0.32; 'message.': 0.35; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'ian': 0.60; 'skip:c 50': 0.60; 'first': 0.61; 'show': 0.63; 'our': 0.64; 'world': 0.66; 'believe': 0.68; 'fact,': 0.69; '3.3.1': 0.84; 'eco': 0.84; 'received:202.71': 0.84; 'skip:/ 30': 0.84; 'terrible': 0.84; 'continue.': 0.91; '2013': 0.98 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Robert Kern <robert.kern@gmail.com> |
| Subject | Re: Python pdb bug, followed by bug in bugs.python.org |
| Date | Fri, 12 Apr 2013 00:12:50 +0530 |
| References | <a34e8251-85df-4486-b5a1-72eb2bb9f353@googlegroups.com> <kk1tfh$1st$1@reader1.panix.com> <b06d47b6-9ecf-44a3-bea2-20994dd0f1f4@googlegroups.com> <CALwzidnmvOCgX+0Vgk+iEOGwYX2QiJkR=-Wo_wDMbcFmFmWevA@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | 202.71.137.182 |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 |
| In-Reply-To | <CALwzidnmvOCgX+0Vgk+iEOGwYX2QiJkR=-Wo_wDMbcFmFmWevA@mail.gmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.490.1365705781.3114.python-list@python.org> (permalink) |
| Lines | 59 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1365705781 news.xs4all.nl 2612 [2001:888:2000:d::a6]:50050 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:43396 |
Show key headers only | View raw
On 2013-04-11 23:11, Ian Kelly wrote:
> On Thu, Apr 11, 2013 at 8:56 AM, <donaldcallen@gmail.com> wrote:
>> #! /usr/bin/env python3
>> import pdb
>> def foo(message):
>> print(message)
>> pdb.set_trace()
>> foo('first call')
>> foo('second call')
>>
>> Stick this in an file with execute permission and run it. At the first breakpoint, the backtrace will be correct. Continue. At the second breakpoint, a backtrace will show the foo('first call') on the stack when, in fact, the call came from foo('second call'), as verified by the printed message.
>
>
> This is what I get using Python 3.3.1 in Windows:
>
> C:\Users\ikelly\Desktop>c:\python33\python python_bug.py
> first call
> --Return--
>> c:\users\ikelly\desktop\python_bug.py(7)foo()->None
> -> pdb.set_trace()
> (Pdb) c
> second call
> --Return--
>> c:\users\ikelly\desktop\python_bug.py(7)foo()->None
> -> pdb.set_trace()
> (Pdb) c
Use `where` to see the problem:
[~/scratch]$ python3.3 pdbbug.py
first call
--Return--
> /Users/rkern/scratch/pdbbug.py(4)foo()->None
-> pdb.set_trace()
(Pdb) where
/Users/rkern/scratch/pdbbug.py(5)<module>()
-> foo('first call')
> /Users/rkern/scratch/pdbbug.py(4)foo()->None
-> pdb.set_trace()
(Pdb) c
second call
--Return--
> /Users/rkern/scratch/pdbbug.py(4)foo()->None
-> pdb.set_trace()
(Pdb) where
/Users/rkern/scratch/pdbbug.py(5)<module>()
-> foo('first call')
> /Users/rkern/scratch/pdbbug.py(4)foo()->None
-> pdb.set_trace()
(Pdb)
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python pdb bug, followed by bug in bugs.python.org donaldcallen@gmail.com - 2013-04-09 08:25 -0700
Re: Python pdb bug, followed by bug in bugs.python.org Arnaud Delobelle <arnodel@gmail.com> - 2013-04-09 21:03 +0100
Re: Python pdb bug, followed by bug in bugs.python.org John Gordon <gordon@panix.com> - 2013-04-09 20:25 +0000
Re: Python pdb bug, followed by bug in bugs.python.org donaldcallen@gmail.com - 2013-04-11 07:56 -0700
Re: Python pdb bug, followed by bug in bugs.python.org Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-11 11:41 -0600
Re: Python pdb bug, followed by bug in bugs.python.org Robert Kern <robert.kern@gmail.com> - 2013-04-12 00:12 +0530
Re: Python pdb bug, followed by bug in bugs.python.org Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-11 12:55 -0600
Re: Python pdb bug, followed by bug in bugs.python.org Ned Deily <nad@acm.org> - 2013-04-09 15:17 -0700
Re: Python pdb bug, followed by bug in bugs.python.org Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-04-11 10:50 +1200
Re: Python pdb bug, followed by bug in bugs.python.org Ned Deily <nad@acm.org> - 2013-04-10 23:39 -0700
Re: Python pdb bug, followed by bug in bugs.python.org donaldcallen@gmail.com - 2013-04-11 08:12 -0700
Re: Python pdb bug, followed by bug in bugs.python.org Piotr Dobrogost <p@google-groups-2013.dobrogost.net> - 2013-04-13 10:28 -0700
Re: Python pdb bug, followed by bug in bugs.python.org Ned Deily <nad@acm.org> - 2013-04-13 11:11 -0700
Re: Python pdb bug, followed by bug in bugs.python.org Piotr Dobrogost <p@google-groups-2013.dobrogost.net> - 2013-04-13 10:28 -0700
Re: Python pdb bug, followed by bug in bugs.python.org donaldcallen@gmail.com - 2013-04-11 08:12 -0700
csiph-web