This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients Rolf Campbell, brett.cannon, eric.snow, ncoghlan, r.david.murray
Date 2018-05-18.21:43:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526679808.12.0.682650639539.issue33547@psf.upfronthosting.co.za>
In-reply-to
Content
It's the same answer.  __init__ *is* the package namespace, so you are setting the value of 'func' in the package (.) namespace, and what import is doing is correct.

I know this is confusing.  I banged my head against it while debugging a weird import problem in the anydb module, but it is working as designed.  I think the way __init__ works may fall under rule 14 of the Zen :)
History
Date User Action Args
2018-05-18 21:43:28r.david.murraysetrecipients: + r.david.murray, brett.cannon, ncoghlan, eric.snow, Rolf Campbell
2018-05-18 21:43:28r.david.murraysetmessageid: <1526679808.12.0.682650639539.issue33547@psf.upfronthosting.co.za>
2018-05-18 21:43:28r.david.murraylinkissue33547 messages
2018-05-18 21:43:28r.david.murraycreate