Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d346475a
Kaydet (Commit)
d346475a
authored
Mar 21, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add docs for print_function and future_builtins. Fixes #2442.
üst
3fbe20c0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
0 deletions
+81
-0
functions.rst
Doc/library/functions.rst
+27
-0
future_builtins.rst
Doc/library/future_builtins.rst
+53
-0
python.rst
Doc/library/python.rst
+1
-0
No files found.
Doc/library/functions.rst
Dosyayı görüntüle @
d346475a
...
...
@@ -817,6 +817,33 @@ available. They are listed here in alphabetical order.
accidents.)
.. function:: print([object, ...][, sep='
'][, end='
\
n
'][, file=sys.stdout])
Print *object*\(s) to the stream *file*, separated by *sep* and followed by
*end*. *sep*, *end* and *file*, if present, must be given as keyword
arguments.
All non-keyword arguments are converted to strings like :func:`str` does and
written to the stream, separated by *sep* and followed by *end*. Both *sep*
and *end* must be strings; they can also be ``None``, which means to use the
default values. If no *object* is given, :func:`print` will just write
*end*.
The *file* argument must be an object with a ``write(string)`` method; if it
is not present or ``None``, :data:`sys.stdout` will be used.
.. note::
This function is not normally available as a builtin since the name
``print`` is recognized as the :keyword:`print` statement. To disable the
statement and use the :func:`print` function, use this future statement at
the top of your module::
from __future__ import print_function
.. versionadded:: 2.6
.. function:: property([fget[, fset[, fdel[, doc]]]])
Return a property attribute for :term:`new-style class`\es (classes that
...
...
Doc/library/future_builtins.rst
0 → 100644
Dosyayı görüntüle @
d346475a
: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
Dosyayı görüntüle @
d346475a
...
...
@@ -14,6 +14,7 @@ overview:
sys.rst
__builtin__.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