On Thu, May 2, 2013 at 1:18 PM, fwierzbi...@gmail.com
<fwierzbi...@gmail.com> wrote:
> On Thu, May 2, 2013 at 12:07 PM, Ethan Furman <et...@stoneleaf.us> wrote:
>> In order for the Enum convenience function to be pickleable, we have this
>> line of code in the metaclass:
>>
>>     enum_class.__module__ = sys._getframe(1).f_globals['__name__']
>>
>> This works fine for Cpython, but what about the others?
> This should work for Jython, but I can't say I like it. I believe
> IronPython has a sort of speedup mode that disallows the use of
> _getframe, and I'd like to add this to Jython someday.

It's not just a "speedup mode", it's the default. IronPython requires
frames to explicitly enabled because tracking them is about a 10%
performance hit (or so Dino told me once upon a time).

If you must use it, please copy the code block from namedtuple that
ignores it on IronPython.

- Jeff
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to