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
f725b958
Commit
f725b958
authored
Jan 05, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc patch #1730 from Robin Stocker; minor corrections mostly to os.rst.
parent
6265833d
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
101 additions
and
95 deletions
+101
-95
Doc/c-api/newtypes.rst
Doc/c-api/newtypes.rst
+1
-1
Doc/library/fcntl.rst
Doc/library/fcntl.rst
+1
-1
Doc/library/functions.rst
Doc/library/functions.rst
+1
-1
Doc/library/msvcrt.rst
Doc/library/msvcrt.rst
+1
-1
Doc/library/os.rst
Doc/library/os.rst
+77
-76
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+7
-2
Doc/library/winsound.rst
Doc/library/winsound.rst
+1
-1
Doc/reference/expressions.rst
Doc/reference/expressions.rst
+10
-10
Lib/test/test_doctest.py
Lib/test/test_doctest.py
+1
-1
Modules/fcntlmodule.c
Modules/fcntlmodule.c
+1
-1
No files found.
Doc/c-api/newtypes.rst
View file @
f725b958
...
@@ -746,7 +746,7 @@ type objects) *must* have the :attr:`ob_size` field.
...
@@ -746,7 +746,7 @@ type objects) *must* have the :attr:`ob_size` field.
indicated by the :const:`Py_TPFLAGS_HAVE_RICHCOMPARE` flag bit) and have *NULL*
indicated by the :const:`Py_TPFLAGS_HAVE_RICHCOMPARE` flag bit) and have *NULL*
values.
values.
The following bit masks are currently defined; these can be
or-
ed together using
The following bit masks are currently defined; these can be
OR
ed together using
the ``|`` operator to form the value of the :attr:`tp_flags` field. The macro
the ``|`` operator to form the value of the :attr:`tp_flags` field. The macro
:cfunc:`PyType_HasFeature` takes a type and a flags value, *tp* and *f*, and
:cfunc:`PyType_HasFeature` takes a type and a flags value, *tp* and *f*, and
checks whether ``tp->tp_flags & f`` is non-zero.
checks whether ``tp->tp_flags & f`` is non-zero.
...
...
Doc/library/fcntl.rst
View file @
f725b958
...
@@ -109,7 +109,7 @@ The module defines the following functions:
...
@@ -109,7 +109,7 @@ The module defines the following functions:
* :const:`LOCK_EX` -- acquire an exclusive lock
* :const:`LOCK_EX` -- acquire an exclusive lock
When *operation* is :const:`LOCK_SH` or :const:`LOCK_EX`, it can also be
When *operation* is :const:`LOCK_SH` or :const:`LOCK_EX`, it can also be
bit
-wise OR'
d with :const:`LOCK_NB` to avoid blocking on lock acquisition.
bit
wise ORe
d with :const:`LOCK_NB` to avoid blocking on lock acquisition.
If :const:`LOCK_NB` is used and the lock cannot be acquired, an
If :const:`LOCK_NB` is used and the lock cannot be acquired, an
:exc:`IOError` will be raised and the exception will have an *errno*
:exc:`IOError` will be raised and the exception will have an *errno*
attribute set to :const:`EACCES` or :const:`EAGAIN` (depending on the
attribute set to :const:`EACCES` or :const:`EAGAIN` (depending on the
...
...
Doc/library/functions.rst
View file @
f725b958
...
@@ -216,7 +216,7 @@ available. They are listed here in alphabetical order.
...
@@ -216,7 +216,7 @@ available. They are listed here in alphabetical order.
the *flags* argument is it -- the future statements in effect around the call to
the *flags* argument is it -- the future statements in effect around the call to
compile are ignored.
compile are ignored.
Future statements are specified by bits which can be bitwise
or-
ed together to
Future statements are specified by bits which can be bitwise
OR
ed together to
specify multiple statements. The bitfield required to specify a given feature
specify multiple statements. The bitfield required to specify a given feature
can be found as the :attr:`compiler_flag` attribute on the :class:`_Feature`
can be found as the :attr:`compiler_flag` attribute on the :class:`_Feature`
instance in the :mod:`__future__` module.
instance in the :mod:`__future__` module.
...
...
Doc/library/msvcrt.rst
View file @
f725b958
...
@@ -67,7 +67,7 @@ File Operations
...
@@ -67,7 +67,7 @@ File Operations
.. function:: open_osfhandle(handle, flags)
.. function:: open_osfhandle(handle, flags)
Create a C runtime file descriptor from the file handle *handle*. The *flags*
Create a C runtime file descriptor from the file handle *handle*. The *flags*
parameter should be a bit
-
wise OR of :const:`os.O_APPEND`, :const:`os.O_RDONLY`,
parameter should be a bitwise OR of :const:`os.O_APPEND`, :const:`os.O_RDONLY`,
and :const:`os.O_TEXT`. The returned file descriptor may be used as a parameter
and :const:`os.O_TEXT`. The returned file descriptor may be used as a parameter
to :func:`os.fdopen` to create a file object.
to :func:`os.fdopen` to create a file object.
...
...
Doc/library/os.rst
View file @
f725b958
This diff is collapsed.
Click to expand it.
Doc/library/stdtypes.rst
View file @
f725b958
...
@@ -398,7 +398,7 @@ for bit-strings. Negative numbers are treated as their 2's complement value
...
@@ -398,7 +398,7 @@ for bit-strings. Negative numbers are treated as their 2's complement value
(for long integers, this assumes a sufficiently large number of bits that no
(for long integers, this assumes a sufficiently large number of bits that no
overflow occurs during the operation).
overflow occurs during the operation).
The priorities of the binary bit
-
wise operations are all lower than the numeric
The priorities of the binary bitwise operations are all lower than the numeric
operations and higher than the comparisons; the unary operation ``~`` has the
operations and higher than the comparisons; the unary operation ``~`` has the
same priority as the other unary numeric operations (``+`` and ``-``).
same priority as the other unary numeric operations (``+`` and ``-``).
...
@@ -2029,7 +2029,12 @@ Files have the following methods:
...
@@ -2029,7 +2029,12 @@ Files have the following methods:
argument is optional and defaults to ``os.SEEK_SET`` or ``0`` (absolute file
argument is optional and defaults to ``os.SEEK_SET`` or ``0`` (absolute file
positioning); other values are ``os.SEEK_CUR`` or ``1`` (seek relative to the
positioning); other values are ``os.SEEK_CUR`` or ``1`` (seek relative to the
current position) and ``os.SEEK_END`` or ``2`` (seek relative to the file's
current position) and ``os.SEEK_END`` or ``2`` (seek relative to the file's
end). There is no return value. Note that if the file is opened for appending
end). There is no return value.
For example, ``f.seek(2, os.SEEK_CUR)`` advances the position by two and
``f.seek(-3, os.SEEK_END)`` sets the position to the third to last.
Note that if the file is opened for appending
(mode ``'a'`` or ``'a+'``), any :meth:`seek` operations will be undone at the
(mode ``'a'`` or ``'a+'``), any :meth:`seek` operations will be undone at the
next write. If the file is only opened for writing in append mode (mode
next write. If the file is only opened for writing in append mode (mode
``'a'``), this method is essentially a no-op, but it remains useful for files
``'a'``), this method is essentially a no-op, but it remains useful for files
...
...
Doc/library/winsound.rst
View file @
f725b958
...
@@ -36,7 +36,7 @@ provided by Windows platforms. It includes functions and several constants.
...
@@ -36,7 +36,7 @@ provided by Windows platforms. It includes functions and several constants.
Call the underlying :cfunc:`PlaySound` function from the Platform API. The
Call the underlying :cfunc:`PlaySound` function from the Platform API. The
*sound* parameter may be a filename, audio data as a string, or ``None``. Its
*sound* parameter may be a filename, audio data as a string, or ``None``. Its
interpretation depends on the value of *flags*, which can be a bit
-
wise ORed
interpretation depends on the value of *flags*, which can be a bitwise ORed
combination of the constants described below. If the system indicates an error,
combination of the constants described below. If the system indicates an error,
:exc:`RuntimeError` is raised.
:exc:`RuntimeError` is raised.
...
...
Doc/reference/expressions.rst
View file @
f725b958
...
@@ -811,9 +811,9 @@ Unary arithmetic operations
...
@@ -811,9 +811,9 @@ Unary arithmetic operations
.. index::
.. index::
triple: unary; arithmetic; operation
triple: unary; arithmetic; operation
triple: unary; bit
-
wise; operation
triple: unary; bitwise; operation
All unary arithmetic (and bit
-
wise) operations have the same priority:
All unary arithmetic (and bitwise) operations have the same priority:
.. productionlist::
.. productionlist::
u_expr: `power` | "-" `u_expr` | "+" `u_expr` | "~" `u_expr`
u_expr: `power` | "-" `u_expr` | "+" `u_expr` | "~" `u_expr`
...
@@ -830,8 +830,8 @@ The unary ``+`` (plus) operator yields its numeric argument unchanged.
...
@@ -830,8 +830,8 @@ The unary ``+`` (plus) operator yields its numeric argument unchanged.
.. index:: single: inversion
.. index:: single: inversion
The unary ``~`` (invert) operator yields the bit
-
wise inversion of its plain or
The unary ``~`` (invert) operator yields the bitwise inversion of its plain or
long integer argument. The bit
-
wise inversion of ``x`` is defined as
long integer argument. The bitwise inversion of ``x`` is defined as
``-(x+1)``. It only applies to integral numbers.
``-(x+1)``. It only applies to integral numbers.
.. index:: exception: TypeError
.. index:: exception: TypeError
...
@@ -944,10 +944,10 @@ Negative shift counts raise a :exc:`ValueError` exception.
...
@@ -944,10 +944,10 @@ Negative shift counts raise a :exc:`ValueError` exception.
.. _bitwise:
.. _bitwise:
Binary bit
-
wise operations
Binary bitwise operations
=========================
=
=========================
.. index:: triple: binary; bit
-
wise; operation
.. index:: triple: binary; bitwise; operation
Each of the three bitwise operations has a different priority level:
Each of the three bitwise operations has a different priority level:
...
@@ -956,20 +956,20 @@ Each of the three bitwise operations has a different priority level:
...
@@ -956,20 +956,20 @@ Each of the three bitwise operations has a different priority level:
xor_expr: `and_expr` | `xor_expr` "^" `and_expr`
xor_expr: `and_expr` | `xor_expr` "^" `and_expr`
or_expr: `xor_expr` | `or_expr` "|" `xor_expr`
or_expr: `xor_expr` | `or_expr` "|" `xor_expr`
.. index:: pair: bit
-
wise; and
.. index:: pair: bitwise; and
The ``&`` operator yields the bitwise AND of its arguments, which must be plain
The ``&`` operator yields the bitwise AND of its arguments, which must be plain
or long integers. The arguments are converted to a common type.
or long integers. The arguments are converted to a common type.
.. index::
.. index::
pair: bit
-
wise; xor
pair: bitwise; xor
pair: exclusive; or
pair: exclusive; or
The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, which
The ``^`` operator yields the bitwise XOR (exclusive OR) of its arguments, which
must be plain or long integers. The arguments are converted to a common type.
must be plain or long integers. The arguments are converted to a common type.
.. index::
.. index::
pair: bit
-
wise; or
pair: bitwise; or
pair: inclusive; or
pair: inclusive; or
The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which
The ``|`` operator yields the bitwise (inclusive) OR of its arguments, which
...
...
Lib/test/test_doctest.py
View file @
f725b958
...
@@ -909,7 +909,7 @@ Tests of `DocTestRunner`'s option flag handling.
...
@@ -909,7 +909,7 @@ Tests of `DocTestRunner`'s option flag handling.
Several option flags can be used to customize the behavior of the test
Several option flags can be used to customize the behavior of the test
runner. These are defined as module constants in doctest, and passed
runner. These are defined as module constants in doctest, and passed
to the DocTestRunner constructor (multiple constants should be
or-
ed
to the DocTestRunner constructor (multiple constants should be
OR
ed
together).
together).
The DONT_ACCEPT_TRUE_FOR_1 flag disables matches between True/False
The DONT_ACCEPT_TRUE_FOR_1 flag disables matches between True/False
...
...
Modules/fcntlmodule.c
View file @
f725b958
...
@@ -378,7 +378,7 @@ following values:\n\
...
@@ -378,7 +378,7 @@ following values:\n\
LOCK_SH - acquire a shared lock
\n
\
LOCK_SH - acquire a shared lock
\n
\
LOCK_EX - acquire an exclusive lock
\n
\
LOCK_EX - acquire an exclusive lock
\n
\
\n
\
\n
\
When operation is LOCK_SH or LOCK_EX, it can also be bit
-wise OR'
d with
\n
\
When operation is LOCK_SH or LOCK_EX, it can also be bit
wise ORe
d with
\n
\
LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the
\n
\
LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the
\n
\
lock cannot be acquired, an IOError will be raised and the exception will
\n
\
lock cannot be acquired, an IOError will be raised and the exception will
\n
\
have an errno attribute set to EACCES or EAGAIN (depending on the operating
\n
\
have an errno attribute set to EACCES or EAGAIN (depending on the operating
\n
\
...
...
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