Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'correct.': 0.07; 'python3': 0.07; 'subject:bug': 0.07; 'subject:skip:b 10': 0.07; 'python': 0.11; 'def': 0.12; '(pdb)': 0.16; 'pdb': 0.16; 'when,': 0.16; 'windows:': 0.16; 'wrote:': 0.18; 'stack': 0.19; 'thu,': 0.19; 'import': 0.22; 'stick': 0.24; 'permission': 0.26; 'second': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; 'run': 0.32; 'message.': 0.35; 'received:209.85': 0.35; 'received:209.85.220': 0.35; 'received:google.com': 0.35; 'received:209': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'skip:c 50': 0.60; 'first': 0.61; 'show': 0.63; 'fact,': 0.69; '3.3.1': 0.84; 'continue.': 0.91; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=L9J+mkpNBVfqLC1xm0mle2rabepp9HH4L7tW88gn4Xg=; b=eBLY6XgSMIaPUu6CXm8cfp3t71ZvMZRW4ILa4Xu68QClJMKTwobT2oRfZYpGUVmz9A V63etJ8WsSqfiYnq1bkzGXWuOQ/52PAa1zYk3op+ZGbjcmHhnAH7srMFwD4GXaEZLd8n qTl/A5GZcG6XmZayjsPJeisSEWAEac5SaX2Wlq7tGf1VoAQ2LUb+7CBYqiDogvfGoxWC Te6MxUiQ+PtsIa9DlYqRzPoLsYhMKWPcN241tuc4eXFQGUzvCwxyBqtSOnKdlL1OFxd+ 1020Yb/HVQud8yApNlBBvT3y9FrvBKiGU4WFOG4rltseH1KsXhMgWZjh1kA0X90x7hg2 uFMQ== X-Received: by 10.66.151.46 with SMTP id un14mr11210034pab.14.1365702128816; Thu, 11 Apr 2013 10:42:08 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Thu, 11 Apr 2013 11:41:28 -0600 Subject: Re: Python pdb bug, followed by bug in bugs.python.org To: Python Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365702132 news.xs4all.nl 2633 [2001:888:2000:d::a6]:58680 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43392 On Thu, Apr 11, 2013 at 8:56 AM, 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 br= eakpoint, the backtrace will be correct. Continue. At the second breakpoint= , a backtrace will show the foo('first call') on the stack when, in fact, t= he 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