mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Add future_builtins.ascii().
This commit is contained in:
parent
35b9020246
commit
89f48876a2
3 changed files with 24 additions and 0 deletions
|
@ -28,6 +28,14 @@ this usage and leave the new builtins alone.
|
|||
|
||||
Available builtins are:
|
||||
|
||||
.. function:: ascii(object)
|
||||
|
||||
Returns the same as :func:`repr`. In Python 3, :func:`repr` will return
|
||||
printable Unicode characters unescaped, while :func:`ascii` will always
|
||||
backslash-escape them. Using :func:`future_builtins.ascii` instead of
|
||||
:func:`repr` in 2.6 code makes it clear that you need a pure ASCII return
|
||||
value.
|
||||
|
||||
.. function:: filter(function, iterable)
|
||||
|
||||
Works like :func:`itertools.ifilter`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue