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
0df79794
Commit
0df79794
authored
Oct 04, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4000: fix several 2.x atavisms.
parent
b186f343
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
Doc/howto/functional.rst
Doc/howto/functional.rst
+5
-5
Doc/library/collections.rst
Doc/library/collections.rst
+1
-1
Doc/library/reprlib.rst
Doc/library/reprlib.rst
+1
-1
Doc/reference/lexical_analysis.rst
Doc/reference/lexical_analysis.rst
+2
-2
No files found.
Doc/howto/functional.rst
View file @
0df79794
...
...
@@ -69,9 +69,9 @@ output must only depend on its input.
Some languages are very strict about purity and don't even have assignment
statements such as ``a=3`` or ``c = a + b``, but it's difficult to avoid all
side effects. Printing to the screen or writing to a disk file are side
effects, for example. For example, in Python a
``print`` statement or a
``time.sleep(1)`` both return no useful value; they're only called for thei
r
side effects of sending some text to the screen or pausing execution for a
effects, for example. For example, in Python a
call to the :func:`print` or
:func:`time.sleep` function both return no useful value; they're only called fo
r
their
side effects of sending some text to the screen or pausing execution for a
second.
Python programs written in functional style usually won't go to the extreme of
...
...
@@ -1031,8 +1031,8 @@ value and an iterator for the elements with that key.
...
]
def get_state (
(city, state)
):
return
state
def get_state (
city_state
):
return
city_state[1]
itertools.groupby(city_list, get_state) =>
('AL', iterator-1),
...
...
Doc/library/collections.rst
View file @
0df79794
...
...
@@ -632,7 +632,7 @@ a fixed-width print format:
... def __str__(self):
... return 'Point: x=%6.3f y=%6.3f hypot=%6.3f' % (self.x, self.y, self.hypot)
>>> for p in Point(3, 4), Point(14, 5/7
.
):
>>> for p in Point(3, 4), Point(14, 5/7):
... print(p)
Point: x= 3.000 y= 4.000 hypot= 5.000
Point: x=14.000 y= 0.714 hypot=14.018
...
...
Doc/library/reprlib.rst
View file @
0df79794
...
...
@@ -126,7 +126,7 @@ for file objects could be added::
if obj.name in ['<stdin>', '<stdout>', '<stderr>']:
return obj.name
else:
return
`obj`
return
repr(obj)
aRepr = MyRepr()
print aRepr.repr(sys.stdin) # prints '<stdin>'
...
...
Doc/reference/lexical_analysis.rst
View file @
0df79794
...
...
@@ -676,8 +676,8 @@ Delimiters
The following tokens serve as delimiters in the grammar::
( ) [ ] { }
@
, : .
` = ;
( ) [ ] { }
, : .
; @ =
+= -= *= /= //= %=
&= |= ^= >>= <<= **=
...
...
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