Commit Graph

616 Commits

Author SHA1 Message Date
Miss Islington (bot) de8567e38c
bpo-26701: Improve documentation for the rounding special methods. (GH-6054)
(cherry picked from commit 496431ffb6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-03-10 07:55:13 -08:00
Miss Islington (bot) 1028ca4f04 bpo-26701: Add documentation for __trunc__ (GH-6050)
`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.
(cherry picked from commit 308eab979d)

Co-authored-by: Eric Appelt <eric.appelt@gmail.com>
2018-03-11 01:10:45 +10:00
Miss Islington (bot) 6eab93cfe5 bpo-30449: Improve __slots__ documentation (GH-1819)
(cherry picked from commit 2b44e302ec)


Co-authored-by: Aaron Hall, MBA <aaronchall@yahoo.com>
2018-02-22 09:37:40 -08:00
Miss Islington (bot) a8c25d1c7f [3.6] bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-5542)
When `__getattr__` is implemented, attribute lookup will always fall back to that,
even if the initial failure comes from `__getattribute__` or a descriptor's `__get__`
method (including property methods).
(cherry picked from commit d1f318105b)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-02-05 13:10:00 +10:00
Miss Islington (bot) 581ce25e1f bpo-32735: Fix typo in f-strings datetime format specifier example (GH-5464) (GH-5465)
The f-string example for using datetime format specifier does not match the given output.
Changed the format from %b to %B so it matches the output of "January".
(cherry picked from commit b299393cc3)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-01-31 17:17:02 -05:00
Cheryl Sabella 8f68cb7db3 [3.6] bpo-27505: Retrofit module __class__ documentation from 3.7 (GH-5321)
The module `__class__` attribute documentation added to 3.7 for PEP 562
(dynamic module attributes) also applies to earlier versions. This backports
that subset of the new docs to the 3.6 branch so that it will appear in the
main online documentation and in the final 3.6 binary release.

Patch by Cheryl Sabella.
2018-01-27 12:45:24 +10:00
Miss Islington (bot) 22b1050672 Lexical Analysis ref doc: Fix a typo in the string concatenation internal link (GH-5157) (GH-5160)
In lexical analysis reference documentation, the internal link to
the string literal concatenation section was written as`.. _string-catenation:`.
Changed that to `.. _string-concatenation:`.
(cherry picked from commit 3764bb075a)
2018-01-11 22:50:45 -08:00
Miss Islington (bot) 75d1ca26b0 Improve the F-strings and format specifier documentation (GH-4931) (GH-4933)
Mention that the format-specifier mini language in f-strings
is the same one used by str.format.
(cherry picked from commit f4e21a2a72)
2017-12-19 13:09:19 -08:00
Miss Islington (bot) dc5770b161 bpo-32377: improve __del__ docs and fix mention about resurrection (GH-4927) (#4929)
* Fix GH-32377: improve __del__ docs and fix mention about resurrection

* Mention that CPython only calls __del__ once.
(cherry picked from commit 4b965930e8)
2017-12-19 20:00:13 +01:00
Miss Islington (bot) 5a9f379435 F-strings docs: link to Format Specifiers (GH-4888) (GH-4889)
Link to the Format Specification Mini Language section from f-strings' documentation.
(cherry picked from commit d924fa523d)
2017-12-15 10:11:17 -08:00
Miss Islington (bot) 98ad985afe Remove redundant 'exc = True' line (GH-4357)
It can be removed after c28890fb42
(cherry picked from commit 7c9da3e5ba)
2017-11-11 18:11:34 +03:00
Miss Islington (bot) 858ea4354f [3.6] bpo-31799: Make module.__spec__ more discoverable (GH-4010) (#4021)
bpo-31799: Make module.__spec__ more discoverable
(cherry picked from commit 191e313820)
2017-10-17 15:59:21 -04:00
Miss Islington (bot) 641494ec31 bpo-31621: Fix typo in Simple Statements documentation (GH-3809) (GH-3810)
Replace "restriction" with "restrictions".
(cherry picked from commit 8d59aca4a9)
2017-09-28 13:00:17 -07:00
Miss Islington (bot) 26b940f762 bpo-31571: Remove duplicated info in Lexical Analysis documentation (GH-3691) (GH-3754)
- Remove the second mention about the `u` prefix
- Remove the second mention about numeric literals do not include a sign
(cherry picked from commit 4a2d00cb45)
2017-09-25 16:23:33 -07:00
Miss Islington (bot) e2593aa673 bpo-31501: Operator precedence description for arithmetic operators (GH-3633) (GH-3638)
(cherry picked from commit 9b47af6537)
2017-09-19 15:48:29 -07:00
Miss Islington (bot) 4f6bae9677 bpo-31487: Update F-strings doc example (GH-3627) (GH-3628)
Shorten the comment to: "using integer format specifier"
(cherry picked from commit 63c591c0b0)
2017-09-17 07:57:08 -07:00
Miss Islington (bot) 46c1052404 bpo-31487: Improve f-strings documentation (GH-3604) (GH-3619)
Provide additional examples of using format specifiers in f-strings
Added examples for using integer and date format specifiers.
(cherry picked from commit f361897069)
2017-09-16 12:01:32 -07:00
Miss Islington (bot) 547f2a97ea [3.6] Mention enum as a potential use for metaclasses (GH-2982) (GH-3527)
(cherry picked from commit b8d1b9d7c6)
2017-09-12 21:55:23 -07:00
Benjamin Peterson 1b1329debc [3.6] link to legacy doc on the non-legacy website (GH-3362) (#3368)
(cherry picked from commit 60dbed1850)
2017-09-05 17:45:11 -07:00
Benjamin Peterson bae5ddab2c fix some reference to Unicode 8 that should be to Unicode 9 (#2346) 2017-06-22 23:11:52 -07:00
Mariatta 1c92c0edca bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271) (GH-1915)
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..
(cherry picked from commit c6db4811f9)
2017-06-01 21:56:24 -07:00
Mariatta e49c5e9277 [3.6] Fix a trivial typo in global section (GH-1497) (GH-1880)
(cherry picked from commit f34c685020)
2017-05-30 22:08:04 -07:00
Mariatta 60b257b01c bpo-17188: add missing periods at the end of sentences (GH-1875) (GH-1876)
(cherry picked from commit 9efad1e5ae)
2017-05-30 15:37:43 -07:00
csabella ad13d54646 bpo-30354: Update data model documentation for super() (GH-1561) (GH-1868)
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.
(cherry picked from commit 12b1c18098)
2017-05-30 13:48:22 -07:00
csabella 00b381b9a7 bpo-17188: DOC: Document 'from None' in raise statement (GH-1671) (GH-1867)
Original patch by Dennis Mårtensson.
(cherry picked from commit 763557eac0)
2017-05-30 13:27:39 -07:00
Mariatta 03c7600982 Improve grammar in The Import System documentation (GH-1862) (GH-1863)
Replace `an ModuleNotFoundError` with `a ModuleNotFoundError`.
Replace `an path` with `a path`.
(cherry picked from commit 9c972b5780)
2017-05-30 09:29:06 -07:00
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