Alex <alex.gay...@gmail.com> added the comment:

2 ways to do it:

class A(object):
    locals()[42] = "abc"

or

type("A", (object,), {42: "abc"})

----------
nosy: +alex

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11455>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to