mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Recorded merge of revisions 78024 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78024 | georg.brandl | 2010-02-06 19:44:44 +0100 (Sa, 06 Feb 2010) | 1 line #5341: fix "builtin" where used as an adjective ("built-in" is correct). ........
This commit is contained in:
parent
3102bd9afe
commit
c4a55fccab
14 changed files with 46 additions and 43 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue