Commit Graph

242 Commits

Author SHA1 Message Date
Alex Waygood e3f670e137
gh-101100: Fix most Sphinx nitpicks in the glossary and `stdtypes.rst` (#112757) 2023-12-06 08:44:06 +00:00
William Andrea f6afa426d8
Add links under "generator expression" in glossary (#112537) 2023-12-01 00:41:11 -08:00
Victor Stinner 7c50800241
gh-110481, doc: Add "immortal" term to the glossary (#112180) 2023-11-17 15:09:19 +01:00
Jelle Zijlstra 8ab7ad6308
Glossary: Add "static type checker" (#111837)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-08 14:38:36 +00:00
Adam Turner 63acf78d71
GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (#110112) 2023-10-19 18:05:17 +03:00
Adam Turner da99133710
GH-101100: Fix reference warnings for ``__getitem__`` (#110118) 2023-10-19 18:05:05 +03:00
Eric Snow 5dc825d504
gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)
PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
2023-08-07 15:40:59 -06:00
Victor Stinner d524b6f61f
gh-106535: Document PEP 387 Soft Deprecation (#106536)
Mark the optparse module as soft deprecated.
2023-07-08 00:03:51 +02:00
F3eQnxN3RriK bbf722dcd3
gh-101100: Fix reference to asynchronous methods (#106172) 2023-06-28 10:43:11 +00:00
Victor Stinner ae00b810d1
gh-104780: Remove 2to3 program and lib2to3 module (#104781)
* Remove the Tools/scripts/2to3 script.
* Remove the Lib/test/test_lib2to3/ directory.
* Doc/tools/extensions/pyspecific.py: remove the "2to3fixer" object
  type.
* Makefile and PC/layout/main.py no longer compile lib2to3 grammar
  files.
* Update Makefile for 2to3 removal.
2023-05-23 19:40:02 +02:00
Nikita Sobolev 50b4b15984
gh-87864: Use correct function definition syntax in the docs (#103312) 2023-04-11 16:50:25 +03:00
ab fc94d55ff4
glossary.rst: Fix typo in package definition (GH-98865)
This is a tiny typo fix of package definition in glossary. 
According to https://devguide.python.org/documentation/help-documenting/ simple typos don’t require issues of their own, but, instead, a pull request can by submitted directly.

Automerge-Triggered-By: GH:AlexWaygood
2022-10-29 15:42:59 -07:00
MonadChains e3bf125c81
gh-95276: Add callable entry to the glossary (#95738) 2022-10-11 19:41:08 -07:00
Jeff Allen 9a11ed8e50
gh-96397: Document that attributes need not be identifiers (#96454)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-09-29 16:02:27 -07:00
Terry Jan Reedy 3646f6cd88
gh-84910: Tweak IDLE Glossary entry (#95866)
Link "IDLE" to its doc and add 'and Learning' to its expansion,
as in the doc.
2022-08-10 22:04:36 -04:00
Ned Batchelder 3440d197a5
Docs: remove redundant "adverb-adjective" hyphens from compound modifiers (GH-94551)
Discussion: https://discuss.python.org/t/slight-grammar-fix-throughout-adverbs-dont-need-hyphen/17021
2022-07-05 11:16:10 +02:00
Ma Lin 5bc2390229
bpo-38056: overhaul Error Handlers section in codecs documentation (#15732)
* Some handlers were wrongly described as text-encoding only, but actually they can also be used in text-decoding.
* Add more description to each handler.
* Add two REPL examples.
* Add indexes for Error Handler's name.

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-05-08 19:58:55 -07:00
Inada Naoki 6773203487
bpo-47000: Add `locale.getencoding()` (GH-32068) 2022-04-09 09:54:54 +09:00
Géry Ogam 654bd2152d
Update glossary.rst (GH-32093) 2022-03-30 00:21:56 +03:00
Nikita Sobolev b9d8980d89
bpo-43698: do not use `...` as argument name in docs (GH-30502) 2022-01-26 19:06:10 +09:00
Brett Cannon be36e06340
bpo-45250: fix docs regarding `__iter__` and iterators being inconsistently required by CPython (GH-29170)
It is now considered a historical accident that e.g. `for` loops and the `iter()` built-in function do not require the iterators they work with to define `__iter__`, only `__next__`.
2021-11-19 16:40:34 -08:00
Alex Waygood 77a2c77c84
[doc] bpo-45680: Improve glossary entry for generic types (GH-29388)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-11-06 19:00:45 +01:00
Steven Hsu 0363a4014d
bpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349)
Replace sentence with confusing "pseudo-module" with two sentences
separating future statements and the __future__ module.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2021-07-25 21:11:12 -04:00
Steven Hsu c05a790693
bpo-44651: delete entry of "coercion" in Doc/glossary.rst (GH-27226)
bpo 44651: delete entry of "coercion".
2021-07-22 13:18:07 +01:00
Mariusz Felisiak b06ed1d883
Remove duplicate words in docs. (GH-26167) 2021-05-21 23:39:09 +05:30
larryhastings 49b26fa517
bpo-43987: Add "Annotations Best Practices" HOWTO doc. (#25746)
Add "Annotations Best Practices" HOWTO doc.
2021-05-01 21:19:24 -07:00
kj 78ba7c69ad
bpo-42294: Grammar fixes in doc glossary strong/weak refs (GH-23227) 2020-11-11 00:56:55 +01:00
Victor Stinner 23c5f93b83
bpo-42294: Add borrowed/strong reference to doc glossary (GH-23206)
Add "borrowed reference" and "strong reference" to the documentation
glossary.

Enhance also Py_INCREF() and Py_NewRef() documentation.
2020-11-09 13:40:47 +01:00
Victor Stinner 4b9aad4999
bpo-42236: Enhance init and encoding documentation (GH-23109)
Enhance the documentation of the Python startup, filesystem encoding
and error handling, locale encoding. Add a new "Python UTF-8 Mode"
section.

* Add "locale encoding" and "filesystem encoding and error handler"
  to the glossary
* Remove documentation from Include/cpython/initconfig.h: move it to
  Doc/c-api/init_config.rst.
* Doc/c-api/init_config.rst:

  * Document command line options and environment variables
  * Document default values.

* Add a new "Python UTF-8 Mode" section in Doc/library/os.rst.
* Add warnings to Py_DecodeLocale() and Py_EncodeLocale() docs.
* Document how Python selects the filesystem encoding and error
  handler at a single place: PyConfig.filesystem_encoding and
  PyConfig.filesystem_errors.
* PyConfig: move orig_argv member at the right place.
2020-11-02 16:49:54 +01:00
kj 4173320920
bpo-41805: Documentation for PEP 585 (GH-22615) 2020-10-27 14:37:18 -07:00
Andre Delfino e01e442125
[doc] Fix link to abc.ABCMeta.register in Glossary (GH-22932) 2020-10-24 19:59:17 +05:30
Raymond Hettinger 8d3d7314d4
Create a primer section for the descriptor howto guide (GH-22906) 2020-10-23 12:55:39 -07:00
Florian Dahlitz 2d55aa9e37
bpo-29981: Add examples and update index for set, dict, and generator comprehensions'(GH-20272)
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
2020-10-20 17:27:07 -04:00
Andre Delfino d9ab95ff1f
[doc] Leverage the fact that the actual types can now be indexed for typing (GH-22340)
This shows users that they can use the actual types. Using deprecated types is confusing.

This also prefers colections.abc.Sized instead of the alias typing.Sized. I guess the aliases were created to make it convenient to import all collections related types from the same place.

This should be backported to 3.9.

Automerge-Triggered-By: @gvanrossum
2020-09-27 12:07:04 -07:00
Victor Stinner bb0b08540c
bpo-40204: Fix reference to terms in the doc (GH-21865)
Sphinx 3 requires to refer to terms with the exact case.

For example, fix the Sphinx 3 warning:

Doc/library/pkgutil.rst:71: WARNING: term Loader not found in case
sensitive match.made a reference to loader instead.
2020-08-14 12:20:05 +02:00
Roger Iyengar a16d697049
Improve asyncio.loop.call_soon() documentation (GH-20883)
* Add a glossary entry for the term "callback"
* Link to it in loop.call_soon() and in the "Concurrency and Multithreading" section

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
2020-06-22 22:16:00 -04:00
Pablo Galindo 9a669d58e8 bpo-39233: Update positional-only section in the glossary (GH-17874)
https://bugs.python.org/issue39233
2020-01-08 05:00:14 -08:00
Kyle Stanley e407013089 Fix and improve `asyncio.run()` docs (GH-16403) 2019-09-30 17:12:21 -07:00
Raymond Hettinger 4210ad5ebd
bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) 2019-09-12 07:56:28 -07:00
Raymond Hettinger 7117074410 bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895)
* bpo-38096: Clean up the "struct sequence" / "named tuple" docs

* Fix remaining occurrences of "struct sequence"

* Repair a user visible docstring
2019-09-11 15:17:32 +01:00
Julien Palard 0811f2d81a
Doc: Space breaking whole definition. (GH-13615) 2019-05-28 14:04:42 +02:00
Raymond Hettinger cc1c582f6f
bpo-37051: Refine note on what objects are hashable (GH-13587) 2019-05-27 10:21:31 -07:00
Vinodhini Balusamy c0a1a07c7e bpo-32995 - Added context variable in glossary (GH-9741) 2019-05-14 08:11:41 -04:00
Sanyam Khurana 90fb04c1e2 bpo-36822: Fix minor grammatical error in glossary.rst (GH-13145) 2019-05-11 20:04:10 +01:00
Andre Delfino f760610bdd bpo-33832: Add "magic method" glossary entry (GH-7630) 2019-03-26 21:21:27 -04:00
Serhiy Storchaka 2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174) 2018-12-19 08:09:46 +02:00
Sebastián Ramírez 25221b3283 Fix typo in asynchronous generator iterator documentation (GH-10542)
Remove an unnecessary "that":
... will execute that the body ... ->  ... will execute the body ...
2018-11-14 21:51:56 -08:00
Windson yang a9655b7f71 Improve grammar in Glossary. (GH-10474)
a asynchronous generator -> an asynchronous generator
2018-11-12 09:42:38 -08:00
Pablo Galindo b4db249c95 bpo-9842: Add cross-reference to the ellipsis object (GH-4063)
This PR adds a cross-reference to the ellipsis object and the representation of recursive item in containers as indicated in [issue 9842](https://bugs.python.org/issue9842) by @bitdancer.


https://bugs.python.org/issue9842
2018-11-04 14:36:25 -08:00
Stéphane Wirtel e483f02423 bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037) 2018-10-26 12:52:11 +02:00