[issue9136] RuntimeError when profiling Decimal

Mark Dickinson report at bugs.python.org
Thu Jul 1 20:47:14 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Nice shade of blue!  Just a couple of red spots that I'd prefer repainted, namely: (1) please put bodies of 'try:' and 'except:' on separate lines, and (2) please use 'except NameError' instead of a bare except.

And a couple of points that I think also applied to my patch:

- {s: 0 for s in _signals} could also be spelt dict.fromkeys(_signals, 0)

- I think dict(dc.traps) should be dc.traps.copy() instead.  I can't entirely see why it would matter, except that it's conceivable that dc.traps could by a dict subclass with its own copy method.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9136>
_______________________________________


More information about the Python-bugs-list mailing list