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
c4fbcdc4
Commit
c4fbcdc4
authored
Jul 30, 2010
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add note about surprising behaviour from round function.
parent
7410dd11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Doc/library/functions.rst
Doc/library/functions.rst
+7
-0
No files found.
Doc/library/functions.rst
View file @
c4fbcdc4
...
...
@@ -972,6 +972,13 @@ are always available. They are listed here in alphabetical order.
The return value is an integer if called with one argument, otherwise of the
same type as *x*.
.. note::
The behavior of :func:`round` for floats can be surprising: for example,
``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``.
This is not a bug: it's a result of the fact that most decimal fractions
can't be represented exactly as a float. See :ref:`tut-fp-issues` for
more information.
.. function:: set([iterable])
:noindex:
...
...
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