Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(42388)

Side by Side Diff: Doc/library/stdtypes.rst

Issue 11373: Fix 2 new typos in the docs
Patch Set: Created 8 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 .. XXX: reference/datamodel and this have quite a few overlaps! 1 .. XXX: reference/datamodel and this have quite a few overlaps!
2 2
3 3
4 .. _bltin-types: 4 .. _bltin-types:
5 5
6 ************** 6 **************
7 Built-in Types 7 Built-in Types
8 ************** 8 **************
9 9
10 The following sections describe the standard types that are built into the 10 The following sections describe the standard types that are built into the
(...skipping 2303 matching lines...) Expand 10 before | Expand all | Expand 10 after
2314 2314
2315 memoryview type 2315 memoryview type
2316 =============== 2316 ===============
2317 2317
2318 :class:`memoryview` objects allow Python code to access the internal data 2318 :class:`memoryview` objects allow Python code to access the internal data
2319 of an object that supports the :ref:`buffer protocol <bufferobjects>` without 2319 of an object that supports the :ref:`buffer protocol <bufferobjects>` without
2320 copying. Memory is generally interpreted as simple bytes. 2320 copying. Memory is generally interpreted as simple bytes.
2321 2321
2322 .. class:: memoryview(obj) 2322 .. class:: memoryview(obj)
2323 2323
2324 Create a :class:`memoryview` that references *obj*. *obj* must support the 2324 Create a :class:`memoryview` that references *obj*, which must support the
2325 buffer protocol. Builtin objects that support the buffer protocol include 2325 buffer protocol. Builtin objects that support the buffer protocol include
2326 :class:`bytes` and :class:`bytearray`. 2326 :class:`bytes` and :class:`bytearray`.
2327 2327
2328 A :class:`memoryview` has the notion of an *element*, which is the 2328 A :class:`memoryview` has the notion of an *element*, which is the
2329 atomic memory unit handled by the originating object *obj*. For many 2329 atomic memory unit handled by the originating object *obj*. For many
2330 simple types such as :class:`bytes` and :class:`bytearray`, an element 2330 simple types such as :class:`bytes` and :class:`bytearray`, an element
2331 is a single byte, but other types such as :class:`array.array` may have 2331 is a single byte, but other types such as :class:`array.array` may have
2332 bigger elements. 2332 bigger elements.
2333 2333
2334 ``len(view)`` returns the total number of elements in the memoryview, 2334 ``len(view)`` returns the total number of elements in the memoryview,
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
2790 .. [#] Additional information on these special methods may be found in the Pytho n 2790 .. [#] Additional information on these special methods may be found in the Pytho n
2791 Reference Manual (:ref:`customization`). 2791 Reference Manual (:ref:`customization`).
2792 2792
2793 .. [#] As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0] ``, and 2793 .. [#] As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0] ``, and
2794 similarly for tuples. 2794 similarly for tuples.
2795 2795
2796 .. [#] They must have since the parser can't tell the type of the operands. 2796 .. [#] They must have since the parser can't tell the type of the operands.
2797 2797
2798 .. [#] To format only a tuple you should therefore provide a singleton tuple who se only 2798 .. [#] To format only a tuple you should therefore provide a singleton tuple who se only
2799 element is the tuple to be formatted. 2799 element is the tuple to be formatted.
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+