[Python-Dev] PyPy, Jython, & IronPython: Enum convenience function and pickleablity (original) (raw)
Eli Bendersky eliben at gmail.com
Thu May 2 23:11:53 CEST 2013
- Previous message: [Python-Dev] PyPy, Jython, & IronPython: Enum convenience function and pickleablity
- Next message: [Python-Dev] PyPy, Jython, & IronPython: Enum convenience function and pickleablity
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, May 2, 2013 at 2:05 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
On 05/02/2013 01:52 PM, Eli Bendersky wrote:
Back to my question from before, though - do we have a real technical limitation of having something like inspect.whatmoduleaminow**in() that's supposed to work for all Python code? By which you really mean inspect.whatmodulewasIcalledfrom() ? Yes, I guess this is what I meant by "now_in" part. Let's be precise:
Animal = Enum('Animal', '...........')
The call to Enum is the interesting here. In happens in some library and Animal members can then be passed around. But we really want the module where Enum() was invoked to create Animal in the first place.
Eli -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130502/499a1efd/attachment.html>
- Previous message: [Python-Dev] PyPy, Jython, & IronPython: Enum convenience function and pickleablity
- Next message: [Python-Dev] PyPy, Jython, & IronPython: Enum convenience function and pickleablity
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]