diff options
Diffstat (limited to 'Doc/howto/doanddont.rst')
-rw-r--r-- | Doc/howto/doanddont.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/howto/doanddont.rst b/Doc/howto/doanddont.rst index 365a6209d..6fc0d6e 100644 --- a/Doc/howto/doanddont.rst +++ b/Doc/howto/doanddont.rst @@ -52,10 +52,10 @@ One of the most awful question asked on the newsgroup is why this code:: f.read() does not work. Of course, it works just fine (assuming you have a file called -"www".) But it does not work if somewhere in the module, the statement ``from os -import *`` is present. The :mod:`os` module has a function called :func:`open` -which returns an integer. While it is very useful, shadowing builtins is one of -its least useful properties. +"www".) But it does not work if somewhere in the module, the statement ``from +os import *`` is present. The :mod:`os` module has a function called +:func:`open` which returns an integer. While it is very useful, shadowing a +builtin is one of its least useful properties. Remember, you can never know for sure what names a module exports, so either take what you need --- ``from module import name1, name2``, or keep them in the |