[docs] [issue17383] Possibly ambiguous phrasing in tutorial/modules#more-on-modules

Éric Araujo report at bugs.python.org
Fri Mar 8 17:32:49 CET 2013


Éric Araujo added the comment:

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.

----------
title: Error in documentation /2/tutorial/modules.html#more-on-modules -> Possibly ambiguous phrasing in tutorial/modules#more-on-modules

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17383>
_______________________________________


More information about the docs mailing list