[Python-ideas] Implicit submodule imports
Andrew Barnert
abarnert at yahoo.com
Fri Sep 26 22:16:31 CEST 2014
On Sep 26, 2014, at 12:12, Nathaniel Smith <njs at pobox.com> wrote:
> On 26 Sep 2014 19:15, "Nathaniel Smith" <njs at pobox.com> wrote:
> > The proposal is that before exec'ing __init__.py, we check for the existence of a __preinit__.py,
>
> Silly me, obviously the right and proper name for this file would be __new__.py.
>
I had an email written just to say "this sounds brilliant, but why isn't it called __new__", with three paragraphs explaining why it was a good analogy... Now I guess I can delete draft. :)
Anyway, I definitely like this better than re-classing modules in mid-initialization, and better than my magic comment hack (and looking at the code again, of course you're right that my magic comment hack was necessary with anything like my approach, I guess I just forgot in the intervening time).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20140926/2ac7729b/attachment.html>
More information about the Python-ideas
mailing list