From 4432d8202018dba838063b157a810e4668a8f478 Mon Sep 17 00:00:00 2001 From: Sharlak Date: Sun, 30 Jul 2017 21:23:32 +0100 Subject: [PATCH 1/2] lengthened title underline appropriately --- docs/starting/install3/win.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/starting/install3/win.rst b/docs/starting/install3/win.rst index 6010b0b..bb6c38f 100644 --- a/docs/starting/install3/win.rst +++ b/docs/starting/install3/win.rst @@ -1,7 +1,7 @@ .. _install3-windows: Installing Python 3 on Windows -============================ +============================== First, download the `latest version `_ of Python 3.6 from the official website. If you want to be sure you are installing a fully From d39c485d167cc4cf37813ca89ac6a2fdcd9972f3 Mon Sep 17 00:00:00 2001 From: Sharlak Date: Sun, 30 Jul 2017 21:57:19 +0100 Subject: [PATCH 2/2] clarified module naming re: underscores --- docs/writing/structure.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/writing/structure.rst b/docs/writing/structure.rst index b33d6f6..486004c 100644 --- a/docs/writing/structure.rst +++ b/docs/writing/structure.rst @@ -391,7 +391,17 @@ folder named :file:`my` which is not the case. There is an dot notation should be used in the Python docs. If you'd like you could name your module :file:`my_spam.py`, but even our -friend the underscore should not be seen often in module names. +friend the underscore should not be seen often in module names. However, using other +characters (spaces or hyphens) in module names will prevent importing +(- is the subtract operator), so try to keep module names short so there is +no need to separate words. And, most of all, don't namespace with underscores, use submodules instead. + +.. code-block:: python + + # OK + import library.plugin.foo + # not OK + import library.foo_plugin Aside from some naming restrictions, nothing special is required for a Python file to be a module, but you need to understand the import mechanism in order