Commit graph

590 commits

Author SHA1 Message Date
Mariatta
3d3b189f8e [3.6] bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail (GH-1725) (GH-1727)
(cherry picked from commit 43c8a9e39b)
2017-05-22 14:36:19 -07:00
delirious-lettuce
0702cc01fa [3.6] Fix typos in multiple .rst files (GH-1668) (#1702)
(cherry picked from commit 3378b2062c)
2017-05-22 00:26:01 +03:00
Dominik Miedziński
b769c91c2d Fix ModuleNotFoundError typo in import reference (#1610)
(cherry picked from commit c138d84b8d)
2017-05-17 09:17:55 +03:00
Mariatta
af71364c3f [3.6] bpo-28315: Improve code examples in docs (GH-1372) (#1445)
Replace
   File "<stdin>", line 1, in ?
with
   File "<stdin>", line 1, in <module>
(cherry picked from commit 8856940cf2)
2017-05-03 18:41:20 -07:00
Serhiy Storchaka
f2ed2858ee [3.6] bpo-15718: Document the upper bound constrain on the __len__ return value. (GH-1256) (#1259)
(cherry picked from commit 85157cd)
2017-04-23 08:50:14 +03:00
INADA Naoki
4c75fbb485 bpo-29952: Use usual terminology of dict (GH-922)
s/keys and elements/keys and values/
(cherry picked from commit cdcac039fb)
2017-03-31 15:43:10 +09:00
Mariatta
c4021af505 bpo-16011: clarify that 'in' always returns a boolean value (GH-874)
(cherry picked from commit 0ae7c8bd61)
2017-03-28 09:33:54 -07:00
Mariatta
ee51327a23 Remove an outdated statement in execution model docs (GH-754) (GH-775)
(cherry picked from commit fad7f15606)
2017-03-22 18:56:56 -07:00
Mariatta
ff6f371627 bpo-28739: Document that f-strings cannot be used as docstring (GH-592) (GH-600)
(cherry picked from commit d4e89287b3)
2017-03-10 09:52:03 -08:00
Mariatta
7e4897a2fb bpo-26184: import.rst: Improve versionchanged note (GH-325) (GH-326)
(cherry picked from commit 1f5639c77f)
2017-02-26 13:30:44 -08:00
Mariatta
deea29e61e bpo-26184: import.rst: Improve versionchanged note (GH-277) (#320)
(cherry picked from commit 6b4a5f45e2)
2017-02-26 08:55:23 -08:00
Mariatta
7333d1760e bpo-29648: import.rst: Add reference to create_module() (GH-290) (GH-314)
(cherry picked from commit 46ce7599af)
2017-02-26 07:33:54 -08:00
Mariatta
f28db60179 [3.6] Fix small typos in expressions.rst (GH-276) (GH-281)
(cherry picked from commit 132ac381fe)
2017-02-24 16:39:30 -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
Guido van Rossum
015d874626 Issue #28076: Variable annotations should be mangled for private names.
By Ivan Levkivskyi.
2016-09-11 09:45:24 -07:00
Brett Cannon
a721abac29 Issue #26331: Implement the parsing part of PEP 515.
Thanks to Georg Brandl for the patch.
2016-09-09 14:57:09 -07:00
Eric Snow
68f4dd8b01 Doc updates for PEPs 520 and 468. 2016-09-09 11:22:14 -07:00
Guido van Rossum
6cff8744a0 Issue #27999: Make "global after use" a SyntaxError, and ditto for nonlocal.
Patch by Ivan Levkivskyi.
2016-09-09 09:36:26 -07:00
Yury Selivanov
f8cb8a16a3 Issue #27985: Implement PEP 526 -- Syntax for Variable Annotations.
Patch by Ivan Levkivskyi.
2016-09-08 20:50:03 -07:00
Eric Snow
4f29e75289 Issue #24254: Drop cls.__definition_order__. 2016-09-08 15:11:11 -07:00
Eric Snow
b957b0c2bc Issue #28030: Update the language reference for PEP 468. 2016-09-08 13:59:58 -07:00
R David Murray
110b6fecbb #27364: Deprecate invalid escape strings in str/byutes.
Patch by Emanuel Barry, reviewed by Serhiy Storchaka and Martin Panter.
2016-09-08 15:34:08 -04:00
Eric Snow
46f97b85a8 Issue #15767: Use ModuleNotFoundError. 2016-09-07 16:56:15 -07:00
Eric Snow
92a6c170e6 Issue #24254: Preserve class attribute definition order. 2016-09-05 14:50:11 -07:00
Raymond Hettinger
f74c33ad5c Merge 2016-08-25 21:12:16 -07:00
Raymond Hettinger
7ea386e56e Issue 19504: Change "customise" to "customize" American spelling. 2016-08-25 21:11:50 -07:00
Guido van Rossum
97c1adf393 Anti-registration of various ABC methods.
- Issue #25958: Support "anti-registration" of special methods from
  various ABCs, like __hash__, __iter__ or __len__.  All these (and
  several more) can be set to None in an implementation class and the
  behavior will be as if the method is not defined at all.
  (Previously, this mechanism existed only for __hash__, to make
  mutable classes unhashable.)  Code contributed by Andrew Barnert and
  Ivan Levkivskyi.
2016-08-18 09:22:23 -07:00
Brett Cannon
3f63483a30 Merge for issue #27712 2016-08-12 10:57:17 -07:00
Brett Cannon
6336fb2734 Issue #27712: Fix some typos in the import docs.
Thanks to Xiang Zhang for the patch.
2016-08-12 10:56:48 -07:00
Berker Peksag
91494d3b73 Issue #26576: Merge from 3.5 2016-08-03 10:17:51 +03:00
Berker Peksag
6cafececbf Issue #26576: Clarify that the @deco syntax is not always an equivalent of f = deco(f)
Patch by Chris Angelico.
2016-08-03 10:17:21 +03:00
Nick Coghlan
607e1c4c44 Issue 27366: PEP 487 docs updates
- Porting note for type keyword arg handling
- __init_subclass__ note regarding  metaclass hint
2016-07-31 12:42:49 +10:00
Berker Peksag
01d1719062 Issue #27366: Tweak PEP 487 documentation
* Added versionadded directives
* Deleted duplicate sentence from __init_subclass__ docstring
* Modernized tests
2016-07-30 14:06:15 +03:00