Commit Graph

609 Commits

Author SHA1 Message Date
svelankar 9b47af6537 bpo-31501: Operator precedence description for arithmetic operators (#3633) 2017-09-17 17:56:16 -07:00
Mariatta 63c591c0b0 bpo-31487: Update F-strings doc example (GH-3627)
Shorten the comment to: "using integer format specifier"
2017-09-17 07:43:31 -07:00
Mariatta f361897069 Improve f-strings documentation (GH-3604)
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
2017-09-16 11:46:43 -07:00
Louie Lu b8d1b9d7c6 Mention enum as an ex (#2982) 2017-09-12 21:44:14 -07:00
Nick Coghlan 5a8516701f bpo-31344: Per-frame control of trace events (GH-3417)
f_trace_lines: enable/disable line trace events
f_trace_opcodes: enable/disable opcode trace events

These are intended primarily for testing of the interpreter
itself, as they make it much easier to emulate signals
arriving at unfortunate times.
2017-09-08 10:14:16 +10:00
Benjamin Peterson 60dbed1850 link to legacy doc on the non-legacy website (#3362) 2017-09-05 16:24:39 -07:00
Benjamin Peterson 279a96206f bpo-30736: upgrade to Unicode 10.0 (#2344)
Straightforward. While we're at it, though, strip trailing whitespace from generated tables.
2017-06-22 22:31:08 -07:00
Lisa Roach 64505a1f6c bpo-30486: Allow setting cell value (#1840)
The cell_contents attribute of the cell object is now writable.
2017-06-08 14:43:26 +03:00
Mariatta 9efad1e5ae bpo-17188: add missing periods at the end of sentences (GH-1875) 2017-05-30 15:26:42 -07:00
kms70847 9c972b5780 Improve grammar in The Import System documentation (GH-1862)
Replace `an ModuleNotFoundError` with `a ModuleNotFoundError`.
Replace `an path` with `a path`.
2017-05-30 09:12:33 -07:00
Aaron Hall, MBA 2b44e302ec bpo-30449 Terse slots (#1819)
* correct __slots__ documentation with minimal changes

* add multiple inheritance info

* remove mapping from description
2017-05-25 22:33:26 -07:00
Naomi Ceder 43c8a9e39b bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail (GH-1725) 2017-05-22 14:09:55 -07:00
csabella 763557eac0 bpo-17188: DOC: Document 'from None' in raise statement (#1671)
Original patch by Dennis Mårtensson.
2017-05-20 02:48:28 -04:00
delirious-lettuce 3378b2062c Fix typos in multiple `.rst` files (#1668) 2017-05-19 23:37:57 +03:00
Dominik Miedziński af34e0a07b Fix ModuleNotFoundError typo in import reference (#1606) 2017-05-16 19:40:17 +03:00
csabella 12b1c18098 bpo-30354: Update data model documentation for super() (GH-1561)
The data model section of the language reference was written well
before the zero-argument form of super() was added.

To avoid giving the impression that they're doing something
unusual, this updates the description of `__new__` and `__init__`
to use the zero-argument form.

Patch by Cheryl Sabella.
2017-05-15 13:42:00 +10:00
Serhiy Storchaka 7e19dbc92e bpo-28974: `object.__format__(x, '')` is now equivalent to `str(x)` (#506)
rather than `format(str(self), '')`.
2017-05-13 12:40:52 +03:00
Jim Fasarakis-Hilliard f34c685020 Fix a trivial typo in global section (#1497) 2017-05-08 04:36:29 -07:00
UltimateCoder 8856940cf2 bpo-28315: Improve code examples in docs (GH-1372)
Replace
   File "<stdin>", line 1, in ? 
with 
   File "<stdin>", line 1, in <module>
2017-05-03 09:46:45 -07:00
Jelle Zijlstra 2e624690bd bpo-29679: Implement @contextlib.asynccontextmanager (#360) 2017-04-30 18:25:58 -07:00
csabella c6db4811f9 bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271)
Builtin container types have two potential link targets in the docs:

- their entry in the list of builtin callables
- their type documentation

This change brings `bytes` and `bytearray` into line with other
container types by having cross-references default to linking to
their type documentation, rather than their builtin callable entry.
2017-04-26 15:47:01 +10:00
Serhiy Storchaka 2e576f5aec bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263) 2017-04-24 09:05:00 +03:00
Serhiy Storchaka 85157cd89a bpo-15718: Document the upper bound constrain on the __len__ return value. (#1256) 2017-04-23 08:37:58 +03:00
Serhiy Storchaka 997a4adea6 Remove outdated note about constraining of the bit shift right operand. (#1258)
The constrain was removed in bpo-29816.
2017-04-22 21:50:09 +03:00
cocoatomo cdcac039fb bpo-29952: Use usual terminology of dict (GH-917)
s/keys and elements/keys and values/
2017-03-31 14:48:49 +09:00
Amit Kumar 0ae7c8bd61 bpo-16011 clarify that 'in' always returns a boolean value 2017-03-28 10:13:01 -04:00
Ivan Levkivskyi fad7f15606 Remove an outdated statement in execution model docs (GH-754) 2017-03-22 17:54:53 -07:00
Mariatta d4e89287b3 bpo-28739: Document that f-strings cannot be used as docstring (GH-592) 2017-03-10 08:58:40 -08:00
Mariatta 1f5639c77f bpo-26184: import.rst: Improve versionchanged note (GH-325) 2017-02-26 13:23:38 -08:00
Mariatta 6b4a5f45e2 bpo-26184: import.rst: Improve versionchanged note (GH-277)
Mention that an ImportError is raised when exec_module() is defined, but
create_module() is not.
2017-02-26 07:36:57 -08:00
Marco Buttu 46ce7599af bpo-29648: import.rst: Add reference to create_module() (GH-290)
Add a reference to create_module(), in the first versionadded of section Loaders.
2017-02-26 07:14:45 -08:00
Jim Fasarakis-Hilliard 132ac381fe Fix small typos in expressions.rst (GH-276) 2017-02-24 12:32:54 -08:00
Martin Panter 2be9889405 Issues #12067: Merge hash recommendation from 3.5 2017-01-29 10:07:26 +00:00
Martin Panter 8dbb0ca573 Issue #12067: Recommend that hash and equality be consistent 2017-01-29 10:00:23 +00:00
Berker Peksag 406c252970 Issue #29012: Merge from 3.5 2017-01-03 03:35:49 +03:00
Berker Peksag 7b4e551091 Issue #29012: Remove another outdated information
Patch by Jim Fasarakis-Hilliard.
2017-01-03 03:34:15 +03:00
Berker Peksag a22457ecaf Issue #29012: Merge from 3.5 2017-01-02 06:01:07 +03:00
Berker Peksag 14adafd6ee Issue #29012: Remove outdated information about __bases__
Patch by Jim Fasarakis-Hilliard.
2017-01-02 06:00:35 +03:00
Martin Panter 7e930d7677 Issue #28954: Merge keyword argument syntax from 3.5 2016-12-24 10:21:30 +00:00
Martin Panter 7106a51c71 Issue #28954: Add missing comma to keyword argument syntax 2016-12-24 10:20:38 +00:00
Victor Stinner 01e4c1175f Merge 3.5 2016-12-19 13:09:55 +01:00
Victor Stinner 509476b370 doc: Suggest to hash(tuple of attr) rather than XOR
Issue #28383: __hash__ documentation recommends naive XOR to combine but this
is suboptimal. Update the doc to suggest to reuse the hash() method using a
tuple, with an example.
2016-12-19 13:09:28 +01:00
Yury Selivanov 03660041d2 Issue #28091: Document PEP 525 & PEP 530.
Patch by Eric Appelt.
2016-12-15 17:36:05 -05:00
Nick Coghlan 19d246745d Issue #23722: improve __classcell__ compatibility
Handling zero-argument super() in __init_subclass__ and
__set_name__ involved moving __class__ initialisation to
type.__new__. This requires cooperation from custom
metaclasses to ensure that the new __classcell__ entry
is passed along appropriately.

The initial implementation of that change resulted in abruptly
broken zero-argument super() support in metaclasses that didn't
adhere to the new requirements (such as Django's metaclass for
Model definitions).

The updated approach adopted here instead emits a deprecation
warning for those cases, and makes them work the same way they
did in Python 3.5.

This patch also improves the related class machinery documentation
to cover these details and to include more reader-friendly
cross-references and index entries.
2016-12-05 16:47:55 +10:00
Martin Panter 28540183c9 Another en → em dash fix for 3.6 2016-11-21 04:10:45 +00:00
Jason R. Coombs f66f03bd35 Update docs to reflect new behavior around backslashes in expressions (not allowed), matching recent changes to PEP 498. 2016-11-06 11:27:17 -05:00
Serhiy Storchaka 989db5c880 Issue #19795: Mark up None as literal text. 2016-10-19 16:37:13 +03:00
Serhiy Storchaka ecf41da83e Issue #19795: Mark up None as literal text. 2016-10-19 16:29:26 +03:00
Raymond Hettinger 0b51fd4341 merge 2016-09-11 17:24:05 -07:00
Raymond Hettinger 06e18a7c24 Issue #26511: Reference the id() function in the 'is' and 'is not' docs 2016-09-11 17:23:49 -07:00