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 eric.araujo
Recipients Piotr.Kuchta, ashwch, docs@python, eric.araujo, ezio.melotti, jeffknupp
Date 2013-03-08.16:32:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1362760369.75.0.501326153581.issue17383@psf.upfronthosting.co.za>
In-reply-to
Content
Ah, we have it: the tutorial distinguishes between “it’s customary to put imports near the top of the file” vs. “later in the file”, and you interpret it as “it’s customary to put imports at the module top level” vs. “import in any scope e.g. functions”.  These are actually two different things, covered in different part of the docs: importing at module scope is very much recommended, as imports in functions can lead to nasty side-effects; and then there’s the style issue of putting imports at the beginning of the file, which is what the section we discuss is about.
History
Date User Action Args
2013-03-08 16:32:49eric.araujosetrecipients: + eric.araujo, ezio.melotti, docs@python, jeffknupp, ashwch, Piotr.Kuchta
2013-03-08 16:32:49eric.araujosetmessageid: <1362760369.75.0.501326153581.issue17383@psf.upfronthosting.co.za>
2013-03-08 16:32:49eric.araujolinkissue17383 messages
2013-03-08 16:32:49eric.araujocreate