Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40143 > unrolled thread
| Started by | Demian Brecht <demianbrecht@gmail.com> |
|---|---|
| First post | 2013-02-28 09:24 -0800 |
| Last post | 2013-02-28 09:24 -0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
Breaking into descriptors Demian Brecht <demianbrecht@gmail.com> - 2013-02-28 09:24 -0800
| From | Demian Brecht <demianbrecht@gmail.com> |
|---|---|
| Date | 2013-02-28 09:24 -0800 |
| Subject | Breaking into descriptors |
| Message-ID | <mailman.2655.1362072729.2939.python-list@python.org> |
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?
Thanks,
--
Demian Brecht
http://demianbrecht.github.com
Back to top | Article view | comp.lang.python
csiph-web