<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 2, 2013 at 2:05 PM, Ethan Furman <span dir="ltr"><<a href="mailto:ethan@stoneleaf.us" target="_blank">ethan@stoneleaf.us</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 05/02/2013 01:52 PM, Eli Bendersky wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Back to my question from before, though - do we have a real technical limitation of having something like<br>
inspect.what_module_am_i_now_<u></u>in() that's supposed to work for all Python code?<br>
</blockquote>
<br></div>
By which you really mean inspect.what_module_was_I_called_from() ?<br>
<br></blockquote><div><br></div><div>Yes, I guess this is what I meant by "now_in" part. Let's be precise:<br><br></div><div>Animal = Enum('Animal', '...........')<br><br></div><div>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.<br>
<br></div><div>Eli<br><br></div></div><br></div></div>