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
be5229ec
Commit
be5229ec
authored
Apr 24, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed documentation for future_builtins
parent
35e8c465
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
54 deletions
+0
-54
Doc/library/future_builtins.rst
Doc/library/future_builtins.rst
+0
-53
Doc/library/python.rst
Doc/library/python.rst
+0
-1
No files found.
Doc/library/future_builtins.rst
deleted
100644 → 0
View file @
35e8c465
:mod:`future_builtins` --- Python 3 builtins
============================================
.. module:: future_builtins
.. sectionauthor:: Georg Brandl
.. versionadded:: 2.6
This module provides functions that exist in 2.x, but have different behavior in
Python 3, so they cannot be put into the 2.x builtin namespace.
Instead, if you want to write code compatible with Python 3 builtins, import
them from this module, like this::
from future_builtins import map, filter
... code using Python 3-style map and filter ...
The :program:`2to3` tool that ports Python 2 code to Python 3 will recognize
this usage and leave the new builtins alone.
.. note::
The Python 3 :func:`print` function is already in the builtins, but cannot be
accessed from Python 2 code unless you use the appropriate future statement::
from __future__ import print_function
Available builtins are:
.. function:: filter(function, iterable)
Works like :func:`itertools.ifilter`.
.. function:: hex(object)
Works like the builtin :func:`hex`, but instead of :meth:`__hex__` it will
use the :meth:`__index__` method on its argument to get an integer that is
then converted to hexadecimal.
.. function:: map(function, iterable, ...)
Works like :func:`itertools.imap`.
.. function:: oct(object)
Works like the builtin :func:`oct`, but instead of :meth:`__oct__` it will
use the :meth:`__index__` method on its argument to get an integer that is
then converted to hexadecimal.
.. function:: zip(*iterables)
Works like :func:`itertools.izip`.
Doc/library/python.rst
View file @
be5229ec
...
...
@@ -14,7 +14,6 @@ overview:
sys.rst
builtins.rst
future_builtins.rst
__main__.rst
warnings.rst
contextlib.rst
...
...
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