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
891391bf
Commit
891391bf
authored
Mar 06, 2011
by
Georg Brandl
Browse files
Options
Browse Files
Download
Plain Diff
Merge doc fixes.
parents
13039c87
1d0a0f50
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
24 deletions
+23
-24
Doc/howto/regex.rst
Doc/howto/regex.rst
+1
-1
Doc/library/asyncore.rst
Doc/library/asyncore.rst
+2
-1
Doc/library/curses.rst
Doc/library/curses.rst
+3
-0
Doc/library/locale.rst
Doc/library/locale.rst
+8
-3
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+1
-1
Doc/library/turtle.rst
Doc/library/turtle.rst
+5
-3
Doc/reference/simple_stmts.rst
Doc/reference/simple_stmts.rst
+0
-10
Doc/tutorial/inputoutput.rst
Doc/tutorial/inputoutput.rst
+3
-5
No files found.
Doc/howto/regex.rst
View file @
891391bf
...
...
@@ -76,7 +76,7 @@ devoted to discussing various metacharacters and what they do.
Here's a complete list of the metacharacters; their meanings will be discussed
in the rest of this HOWTO. ::
. ^ $ * + ? { [ ] \ | ( )
. ^ $ * + ? {
}
[ ] \ | ( )
The first metacharacters we'll look at are ``[`` and ``]``. They're used for
specifying a character class, which is a set of characters that you wish to
...
...
Doc/library/asyncore.rst
View file @
891391bf
...
...
@@ -282,7 +282,8 @@ implement its socket handling::
asyncore.dispatcher.__init__(self)
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.connect( (host, 80) )
self.buffer = bytes('GET %s HTTP/1.0\r\n\r\n' % path, 'ascii')
self.buffer = bytes('GET %s HTTP/1.0\r\nHost: %s\r\n\r\n' %
(path, host), 'ascii')
def handle_connect(self):
pass
...
...
Doc/library/curses.rst
View file @
891391bf
...
...
@@ -1173,6 +1173,9 @@ Several constants are available to specify character cell attributes:
+------------------+-------------------------------+
| ``A_NORMAL`` | Normal attribute. |
+------------------+-------------------------------+
| ``A_REVERSE`` | Reverse background and |
| | foreground colors. |
+------------------+-------------------------------+
| ``A_STANDOUT`` | Standout mode. |
+------------------+-------------------------------+
| ``A_UNDERLINE`` | Underline mode. |
...
...
Doc/library/locale.rst
View file @
891391bf
...
...
@@ -161,7 +161,7 @@ The :mod:`locale` module defines the following exception and functions:
.. data:: D_T_FMT
Get a string that can be used as a format string for :func:`strftime` to
represent
time and dat
e in a locale-specific way.
represent
date and tim
e in a locale-specific way.
.. data:: D_FMT
...
...
@@ -246,12 +246,17 @@ The :mod:`locale` module defines the following exception and functions:
.. data:: ERA_D_T_FMT
Get a format string for :func:`strftime` to represent date
s and times
in a
Get a format string for :func:`strftime` to represent date
and time
in a
locale-specific era-based way.
.. data:: ERA_D_FMT
Get a format string for :func:`strftime` to represent time in a
Get a format string for :func:`strftime` to represent a date in a
locale-specific era-based way.
.. data:: ERA_T_FMT
Get a format string for :func:`strftime` to represent a time in a
locale-specific era-based way.
.. data:: ALT_DIGITS
...
...
Doc/library/stdtypes.rst
View file @
891391bf
...
...
@@ -2311,7 +2311,7 @@ copying. Memory is generally interpreted as simple bytes.
.. class:: memoryview(obj)
Create a :class:`memoryview` that references *obj*. *obj* must support the
buffer protocol. Builtin objects that support the buffer protocol include
buffer protocol. Built
-
in objects that support the buffer protocol include
:class:`bytes` and :class:`bytearray`.
A :class:`memoryview` has the notion of an *element*, which is the
...
...
Doc/library/turtle.rst
View file @
891391bf
...
...
@@ -2306,9 +2306,11 @@ The demo scripts are:
| bytedesign | complex classical | :func:`tracer`, delay,|
| | turtle graphics pattern | :func:`update` |
+----------------+------------------------------+-----------------------+
| chaos | graphs verhust dynamics, | world coordinates |
| | proves that you must not | |
| | trust computers' computations| |
| chaos | graphs Verhulst dynamics, | world coordinates |
| | shows that computer's | |
| | computations can generate | |
| | results sometimes against the| |
| | common sense expectations | |
+----------------+------------------------------+-----------------------+
| clock | analog clock showing time | turtles as clock's |
| | of your computer | hands, ontimer |
...
...
Doc/reference/simple_stmts.rst
View file @
891391bf
...
...
@@ -119,9 +119,6 @@ square brackets, is recursively defined as follows.
*
If
the
target
list
is
a
comma
-
separated
list
of
targets
:
The
object
must
be
an
iterable
with
the
same
number
of
items
as
there
are
targets
in
the
target
list
,
and
the
items
are
assigned
,
from
left
to
right
,
to
the
corresponding
targets
.
(
This
rule
is
relaxed
as
of
Python
1.5
;
in
earlier
versions
,
the
object
had
to
be
a
tuple
.
Since
strings
are
sequences
,
an
assignment
like
``
a
,
b
=
"xy"
``
is
now
legal
as
long
as
the
string
has
the
right
length
.)
*
If
the
target
list
contains
one
target
prefixed
with
an
asterisk
,
called
a
"starred"
target
:
The
object
must
be
a
sequence
with
at
least
as
many
items
...
...
@@ -991,10 +988,3 @@ pre-existing bindings in the local scope.
:
pep
:`
3104
`
-
Access
to
Names
in
Outer
Scopes
The
specification
for
the
:
keyword
:`
nonlocal
`
statement
.
..
rubric
::
Footnotes
..
[#]
It
may
occur
within
an
:
keyword
:`
except
`
or
:
keyword
:`
else
`
clause
.
The
restriction
on
occurring
in
the
:
keyword
:`
try
`
clause
is
implementor
's
laziness and will eventually be lifted.
Doc/tutorial/inputoutput.rst
View file @
891391bf
...
...
@@ -19,18 +19,16 @@ the :func:`print` function. (A third way is using the :meth:`write` method
of file objects; the standard output file can be referenced as ``sys.stdout``.
See the Library Reference for more information on this.)
.. index:: module: string
Often you'll want more control over the formatting of your output than simply
printing space-separated values. There are two ways to format your output; the
first way is to do all the string handling yourself; using string slicing and
concatenation operations you can create any layout you can imagine. The
st
andard module :mod:`string` contains some
useful operations for padding
st
ring type has some methods that perform
useful operations for padding
strings to a given column width; these will be discussed shortly. The second
way is to use the :meth:`str.format` method.
The :mod:`string` module contains a
class Template which offers yet another way
to substitute values into strings.
The :mod:`string` module contains a
:class:`~string.Template` class which offers
yet another way
to substitute values into strings.
One question remains, of course: how do you convert values to strings? Luckily,
Python has ways to convert any value to a string: pass it to the :func:`repr`
...
...
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