On Thu, May 2, 2013 at 2:05 PM, Ethan Furman <et...@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.what_module_am_i_now_**in() that's supposed to work for all
>> Python code?
>>
>
> By which you really mean inspect.what_module_was_I_called_from() ?
>
>
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
_______________________________________________
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