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
436ebf8a
Commit
436ebf8a
authored
Oct 06, 2014
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Closes #16155: fix a few errors in doctest output of the FAQ pages.
parent
8d867cb7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
Doc/faq/design.rst
Doc/faq/design.rst
+1
-1
Doc/faq/general.rst
Doc/faq/general.rst
+12
-4
Doc/faq/windows.rst
Doc/faq/windows.rst
+1
-1
No files found.
Doc/faq/design.rst
View file @
436ebf8a
...
@@ -49,7 +49,7 @@ Why are floating point calculations so inaccurate?
...
@@ -49,7 +49,7 @@ Why are floating point calculations so inaccurate?
People are often very surprised by results like this::
People are often very surprised by results like this::
>>> 1.2 - 1.0
>>> 1.2 - 1.0
0.1999999999999999
9
6
0.19999999999999996
and think it is a bug in Python. It's not. This has nothing to do with Python,
and think it is a bug in Python. It's not. This has nothing to do with Python,
but with how the underlying C platform handles floating point numbers, and
but with how the underlying C platform handles floating point numbers, and
...
...
Doc/faq/general.rst
View file @
436ebf8a
...
@@ -415,14 +415,22 @@ while they enter their program's source in another window. If they can't
...
@@ -415,14 +415,22 @@ while they enter their program's source in another window. If they can't
remember the methods for a list, they can do something like this::
remember the methods for a list, they can do something like this::
>>> L = []
>>> L = []
>>> dir(L)
>>> dir(L) # doctest: +NORMALIZE_WHITESPACE
['append', 'count', 'extend', 'index', 'insert', 'pop', 'remove',
['__add__', '__class__', '__contains__', '__delattr__', '__delitem__',
'reverse', 'sort']
'__delslice__', '__doc__', '__eq__', '__format__', '__ge__',
'__getattribute__', '__getitem__', '__getslice__', '__gt__',
'__hash__', '__iadd__', '__imul__', '__init__', '__iter__', '__le__',
'__len__', '__lt__', '__mul__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__reversed__', '__rmul__',
'__setattr__', '__setitem__', '__setslice__', '__sizeof__', '__str__',
'__subclasshook__', 'append', 'count', 'extend', 'index', 'insert',
'pop', 'remove', 'reverse', 'sort']
>>> help(L.append)
>>> help(L.append)
Help on built-in function append:
Help on built-in function append:
<BLANKLINE>
append(...)
append(...)
L.append(object) -- append object to end
L.append(object) -- append object to end
<BLANKLINE>
>>> L.append(1)
>>> L.append(1)
>>> L
>>> L
[1]
[1]
...
...
Doc/faq/windows.rst
View file @
436ebf8a
...
@@ -74,7 +74,7 @@ by entering a few expressions of your choice and seeing the results::
...
@@ -74,7 +74,7 @@ by entering a few expressions of your choice and seeing the results::
>>> print "Hello"
>>> print "Hello"
Hello
Hello
>>> "Hello" * 3
>>> "Hello" * 3
HelloHelloHello
'HelloHelloHello'
Many people use the interactive mode as a convenient yet highly programmable
Many people use the interactive mode as a convenient yet highly programmable
calculator. When you want to end your interactive Python session, hold the Ctrl
calculator. When you want to end your interactive Python session, hold the Ctrl
...
...
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