Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a76bb03c
Commit
a76bb03c
authored
Jan 14, 2012
by
Sandro Tosi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
None is not a keyword, link file.next() to functions.html#next
parent
d6e87f43
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+2
-2
Doc/library/sys.rst
Doc/library/sys.rst
+2
-2
Doc/reference/simple_stmts.rst
Doc/reference/simple_stmts.rst
+3
-3
No files found.
Doc/library/stdtypes.rst
View file @
a76bb03c
...
...
@@ -2372,12 +2372,12 @@ Files have the following methods:
A file object is its own iterator, for example ``iter(f)`` returns *f* (unless
*f* is closed). When a file is used as an iterator, typically in a
:keyword:`for` loop (for example, ``for line in f: print line``), the
:meth:`
.
next` method is called repeatedly. This method returns the next input
:meth:`next` method is called repeatedly. This method returns the next input
line, or raises :exc:`StopIteration` when EOF is hit when the file is open for
reading (behavior is undefined when the file is open for writing). In order to
make a :keyword:`for` loop the most efficient way of looping over the lines of a
file (a very common operation), the :meth:`next` method uses a hidden read-ahead
buffer. As a consequence of using a read-ahead buffer, combining :meth:`
.
next`
buffer. As a consequence of using a read-ahead buffer, combining :meth:`next`
with other file methods (like :meth:`readline`) does not work right. However,
using :meth:`seek` to reposition the file to an absolute position will flush the
read-ahead buffer.
...
...
Doc/library/sys.rst
View file @
a76bb03c
...
...
@@ -653,7 +653,7 @@ always available.
imported. The :meth:`find_module` method is called at least with the
absolute name of the module being imported. If the module to be imported is
contained in package then the parent package's :attr:`__path__` attribute
is passed in as a second argument. The method returns
:keyword:`None
` if
is passed in as a second argument. The method returns
``None`
` if
the module cannot be found, else returns a :term:`loader`.
:data:`sys.meta_path` is searched before any implicit default finders or
...
...
@@ -712,7 +712,7 @@ always available.
A dictionary acting as a cache for :term:`finder` objects. The keys are
paths that have been passed to :data:`sys.path_hooks` and the values are
the finders that are found. If a path is a valid file system path but no
explicit finder is found on :data:`sys.path_hooks` then
:keyword:`None
` is
explicit finder is found on :data:`sys.path_hooks` then
``None`
` is
stored to represent the implicit default finder should be used. If the path
is not an existing path then :class:`imp.NullImporter` is set.
...
...
Doc/reference/simple_stmts.rst
View file @
a76bb03c
...
...
@@ -706,7 +706,7 @@ within a package (as denoted by the existence of a dot in the name), then a
second
argument
to
:
meth
:`
find_module
`
is
given
as
the
value
of
the
:
attr
:`
__path__
`
attribute
from
the
parent
package
(
everything
up
to
the
last
dot
in
the
name
of
the
module
being
imported
).
If
a
finder
can
find
the
module
it
returns
a
:
term
:`
loader
`
(
discussed
later
)
or
returns
:
keyword
:`
None
`.
it
returns
a
:
term
:`
loader
`
(
discussed
later
)
or
returns
``
None
`
`.
..
index
::
single
:
sys
.
path_hooks
...
...
@@ -733,11 +733,11 @@ finder cached then :data:`sys.path_hooks` is searched by calling each object in
the
list
with
a
single
argument
of
the
path
,
returning
a
finder
or
raises
:
exc
:`
ImportError
`.
If
a
finder
is
returned
then
it
is
cached
in
:
data
:`
sys
.
path_importer_cache
`
and
then
used
for
that
path
entry
.
If
no
finder
can
be
found
but
the
path
exists
then
a
value
of
:
keyword
:`
None
`
is
can
be
found
but
the
path
exists
then
a
value
of
``
None
`
`
is
stored
in
:
data
:`
sys
.
path_importer_cache
`
to
signify
that
an
implicit
,
file
-
based
finder
that
handles
modules
stored
as
individual
files
should
be
used
for
that
path
.
If
the
path
does
not
exist
then
a
finder
which
always
returns
:
keyword
:`
None
`
is
placed
in
the
cache
for
the
path
.
returns
`
None
`
`
is
placed
in
the
cache
for
the
path
.
..
index
::
single
:
loader
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment