Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'val': 0.07; 'python': 0.09; 'obj,': 0.09; 'subject:into': 0.09; 'def': 0.10; '(pdb)': 0.16; '2.7.3': 0.16; 'pdb': 0.16; 'pdb;': 0.16; 'wrote:': 0.17; 'import': 0.21; 'bug?': 0.22; 'linux': 0.24; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'possibly': 0.27; "doesn't": 0.28; 'obj': 0.29; 'skip:/ 40': 0.29; 'skip:_ 10': 0.29; 'class': 0.29; 'to:addr:python-list': 0.33; 'pm,': 0.35; 'limitation': 0.36; 'method': 0.36; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'received:74.208': 0.71; 'skip:/ 30': 0.91 Date: Thu, 28 Feb 2013 13:01:23 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Breaking into descriptors References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:nEg5XXNBk5C1npkvmCRphO3rmZVHLwfWnzIKQgbjSsy l6nrqtg+CQn1yTI5Aeg0WLmnL/rkC4vAcFx3LBq18XO3zUf/JJ 4eglbg+49wN/mtp+pqfUTvgvczWOULAIrC6Q5rSIx8B3Qu8WwF 9O7M3TNvNX47JCOqgcZcX4oP4+MzpceeCQMkukHNNwN7aUz8M9 Sz0JVEV0qDH6edEmhRtgfsURYQpRpdoyGuLSl1DDj29MnVp5G1 7EBgk7JZeq0qmbUL55K+3K68t8zPlnrzU9wdfvxqlBnOxGsRnP umqVJd/j5k1YRSDPZZ+3o9jM3rPuUKha+MUE9ybnSiS4qW+JQ= = 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1362074502 news.xs4all.nl 6886 [2001:888:2000:d::a6]:51697 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:40148 On 02/28/2013 12:24 PM, Demian Brecht wrote: > class MyDescriptor(object): > def __init__(self): > self.foo = 'bar' > > def __get__(self, obj, type_): > import pdb; pdb.set_trace() > return self.do_something() > > def __set__(self, obj, val): > self.foo = val > > class C(object): > foo = MyDescriptor() > > C().foo > > pdb doesn't break into the descriptor's __get__ method on C().foo. Is > this a known limitation of pdb, or possibly a(n) (un)known bug? > > It halts (breaks) for me, in Python 2.7.3 on Linux > /home/davea/temppython/demian.py(8)__get__() -> return self.do_something() (Pdb) up > /home/davea/temppython/demian.py(19)() -> obj = C().foo (Pdb) -- DaveA