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

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

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 10 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 | « Doc/library/stat.rst ('k') | Doc/library/struct.rst » ('j') | 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 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 Modules 2571 Modules
2572 ------- 2572 -------
2573 2573
2574 The only special operation on a module is attribute access: ``m.name``, where 2574 The only special operation on a module is attribute access: ``m.name``, where
2575 *m* is a module and *name* accesses a name defined in *m*'s symbol table. 2575 *m* is a module and *name* accesses a name defined in *m*'s symbol table.
2576 Module attributes can be assigned to. (Note that the :keyword:`import` 2576 Module attributes can be assigned to. (Note that the :keyword:`import`
2577 statement is not, strictly speaking, an operation on a module object; ``import 2577 statement is not, strictly speaking, an operation on a module object; ``import
2578 foo`` does not require a module object named *foo* to exist, rather it requires 2578 foo`` does not require a module object named *foo* to exist, rather it requires
2579 an (external) *definition* for a module named *foo* somewhere.) 2579 an (external) *definition* for a module named *foo* somewhere.)
2580 2580
2581 A special attribute of every module is :attr:`__dict__`. This is the dictionary 2581 A special member of every module is :attr:`__dict__`. This is the dictionary
2582 containing the module's symbol table. Modifying this dictionary will actually 2582 containing the module's symbol table. Modifying this dictionary will actually
2583 change the module's symbol table, but direct assignment to the :attr:`__dict__` 2583 change the module's symbol table, but direct assignment to the :attr:`__dict__`
2584 attribute is not possible (you can write ``m.__dict__['a'] = 1``, which defines 2584 attribute is not possible (you can write ``m.__dict__['a'] = 1``, which defines
2585 ``m.a`` to be ``1``, but you can't write ``m.__dict__ = {}``). Modifying 2585 ``m.a`` to be ``1``, but you can't write ``m.__dict__ = {}``). Modifying
2586 :attr:`__dict__` directly is not recommended. 2586 :attr:`__dict__` directly is not recommended.
2587 2587
2588 Modules built into the interpreter are written like this: ``<module 'sys' 2588 Modules built into the interpreter are written like this: ``<module 'sys'
2589 (built-in)>``. If loaded from a file, they are written as ``<module 'os' from 2589 (built-in)>``. If loaded from a file, they are written as ``<module 'os' from
2590 '/usr/local/lib/pythonX.Y/os.pyc'>``. 2590 '/usr/local/lib/pythonX.Y/os.pyc'>``.
2591 2591
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2809 .. [#] Additional information on these special methods may be found in the Pytho n 2809 .. [#] Additional information on these special methods may be found in the Pytho n
2810 Reference Manual (:ref:`customization`). 2810 Reference Manual (:ref:`customization`).
2811 2811
2812 .. [#] As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0] ``, and 2812 .. [#] As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0] ``, and
2813 similarly for tuples. 2813 similarly for tuples.
2814 2814
2815 .. [#] They must have since the parser can't tell the type of the operands. 2815 .. [#] They must have since the parser can't tell the type of the operands.
2816 2816
2817 .. [#] To format only a tuple you should therefore provide a singleton tuple who se only 2817 .. [#] To format only a tuple you should therefore provide a singleton tuple who se only
2818 element is the tuple to be formatted. 2818 element is the tuple to be formatted.
OLDNEW
« no previous file with comments | « Doc/library/stat.rst ('k') | Doc/library/struct.rst » ('j') | no next file with comments »

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