Skip to content

Commit 851e537

Browse files
committed
Docs: more tweaks
1 parent 9bdbf5e commit 851e537

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

docs/bytes_object.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ which passes most of the Python 3 tests for :mod:`bytes`. (See
1515
follows::
1616

1717
>>> from future.builtins import bytes
18-
1918
>>> b = bytes(b'ABCD')
2019

2120
On Py3, this is simply the builtin :class:`bytes` object. On Py2, this

docs/dict_object.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ If you already have large native dictionaries, the downside to wrapping them in
5757
a ``dict`` call is that memory is copied (on both Py3 and with
5858
``future.builtins.dict``). For example::
5959

60-
# Currently, this allocates and then frees a large amount of temporary
61-
# memory:
60+
# This allocates and then frees a large amount of temporary memory:
6261
d = dict({i: i**2 for i in range(10**7)})
6362

6463
If dictionary methods like ``values`` and ``items`` are called only once, this

docs/int_object.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ that deals with ``long`` and ``int`` as special cases on Py2. An example is the
3131
following code from ``xlwt-future`` (called by the ``xlwt.antlr.BitSet`` class)
3232
for writing out Excel ``.xls`` spreadsheets. With ``future``, the code is::
3333

34+
from future.builtins import int
35+
3436
def longify(data):
3537
"""
3638
Turns data (an int or long, or a list of ints or longs) into a

docs/isinstance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ However, note that the last test requires that ``unicode_literals`` be imported
5252
>>> assert isinstance('unicode string 2', str)
5353

5454
This works because the backported types ``int``, ``bytes`` and ``str``
55-
have metaclasses that override ``__instancecheck__``. See `PEP 3119
55+
(and others) have metaclasses that override ``__instancecheck__``. See `PEP 3119
5656
<http://www.python.org/dev/peps/pep-3119/#overloading-isinstance-and-issubclass>`_
5757
for details.
5858

docs/what_else.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ compatible code.
1010

1111
.. include:: bytes_object.rst
1212
.. include:: str_object.rst
13-
.. include:: int_object.rst
1413
.. include:: dict_object.rst
14+
.. include:: int_object.rst
1515
.. include:: isinstance.rst
1616
.. include:: open_function.rst
1717
.. include:: custom_str_methods.rst

0 commit comments

Comments
 (0)