[issue9136] RuntimeError when profiling Decimal

Mark Dickinson report at bugs.python.org
Thu Jul 1 12:47:23 CEST 2010


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

class Context(object):
    def __init__(self):
        for name, val in locals().items():
            setattr(self, name, val)


Isn't this dodgy anyway, since 'name' and 'val' end up going into locals()?  I wonder why the RuntimeError *isn't* raised for a normal 'Context()' call (i.e., not via profile).

----------

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


More information about the Python-bugs-list mailing list