Adam Turner
55d50d147c
GH-97950: Use new-style index directive ('statement') ( #104162 )
2023-05-04 13:48:45 +03:00
Adam Turner
6ab463684b
GH-97950: Use new-style index directive ('object') ( #104158 )
...
* Uncomment object removal in pairindextypes
* Use new-style index directive ('object') - C API
* Use new-style index directive ('object') - Library
* Use new-style index directive ('object') - Reference
* Use new-style index directive ('object') - Tutorial
2023-05-04 13:04:41 +03:00
Adam Turner
d0122372f2
GH-97950: Use new-style index directive ('module') ( #103996 )
...
* Use new-style index directive ('module') - C API
* Use new-style index directive ('module') - Library
* Use new-style index directive ('module') - Reference
* Use new-style index directive ('module') - Tutorial
* Uncomment module removal in pairindextypes
* Use new-style index directive ('module') - C API
* Use new-style index directive ('module') - Library
* Use new-style index directive ('module') - Reference
2023-05-04 10:17:12 +02:00
Rafael Fontenelle
68ed2a2a3f
GH-103484: Fix redirected permanently URLs ( #104001 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2023-05-02 09:34:44 +03:00
James Hilton-Balfe
730bbddfdf
gh-101688: Implement types.get_original_bases ( #101827 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-23 20:24:30 +01:00
Alex Waygood
e071f00aae
gh-103373: `__mro_entries__` docs: improve cross references ( #103398 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-11 11:25:45 +01:00
Alex Waygood
0ba0ca05d2
gh-103373: Improve documentation for `__mro_entries__` ( #103374 )
2023-04-08 15:09:00 +01:00
Nikita Sobolev
2a721258a1
gh-101865: Deprecate `co_lnotab` from code objects as per PEP 626 ( #101866 )
...
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-04-03 17:35:04 +02:00
T
88c262c086
gh-100315: clarification to `__slots__` docs. ( #102621 )
...
refer to tp_itemsize in discussion on "variable-length" built-in types
2023-03-14 09:23:52 +00:00
Irit Katriel
4d3bc89a3f
gh-102011: use sys.exception() instead of sys.exc_info() in docs where possible ( #102012 )
2023-02-20 21:54:19 +00:00
Furkan Onder
3690688149
GH-101898: Fix missing term references for hashable definition ( #101899 )
...
Fix missing term references for hashable definition
2023-02-14 14:20:11 +04:00
Paolo Lammens
f59c7f8edd
GH-85979: Clarify specification of `object.__await__` ( #22320 )
...
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-12-31 11:54:04 +05:30
Terry Jan Reedy
a86d854522
Fix typo in `__match_args__` doc ( #99785 )
...
A opy of #98549 , whose author (@icecream17) uses a school computer that blocks the CLA site. I did not mention this in commit comment above so CLA bot does not pick up the name and request the CLA again.
2022-11-26 00:03:16 +00:00
Stanley
268129a74f
docs: Change links to label refs ( #98454 )
...
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-10-25 20:26:28 -07:00
Adam Turner
0031e62973
gh-93738: Documentation C syntax (:c:type:<C type> -> :c:expr:<C type>) ( #97768 )
...
:c:type:`<C type>` -> :c:expr:`<C type>`
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-10-05 11:01:14 -07:00
Ofey Chan
83a3de4e06
gh-96348: Deprecate the 3-arg signature of coroutine.throw and generator.throw (GH-96428)
2022-09-30 09:43:02 +01: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
Dave Goncalves
8be7c2bc5a
bpo-14911: Corrected generator.throw() documentation (GH-32207)
...
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-31 16:56:48 +03:00
jmcb
3af68fc77c
bpo-46013: Fix confusing kerning on period in docs (GH-29989)
2022-03-20 09:58:13 +00:00
David Gilbertson
ab014978ae
Removed ambiguity in __init_subclass__ docs (GH-31540)
2022-03-07 20:13:01 -08:00
Zackery Spytz
b4bd1e1422
bpo-44977: Deprecate delegation of int to __trunc__ (GH-31031)
...
Calling int(a) when type(a) implements __trunc__ but not __int__
or __index__ now raises a DeprecationWarning.
2022-02-03 11:43:25 +02:00
Alex Waygood
aeb9ef4c72
bpo-46076: Improve documentation for per-attribute docstrings with `__slots__` (GH-30109)
2021-12-19 14:20:07 -06:00
Pablo Galindo
3ea574f35b
Fix some false positives of documentation syntax problems
2021-12-08 22:22:55 +00:00
Raymond Hettinger
4ccccb1cfc
bpo-20751: Match variable name to the example. (GH-29980)
2021-12-07 21:38:21 -06:00
Alex Waygood
c0521fe49f
bpo-45840: Improve cross-references in the data model documentation (GH-29633)
2021-12-05 22:49:36 +02:00
Raymond Hettinger
135ecc3492
bpo-20751: Replace method example with attribute example, matching the descriptor howto (GH-29909)
2021-12-03 20:37:08 -06:00
Jouke Witteveen
ee49484c0f
[doc] Clarify MRO precedence in descriptor super binding section (GH-29539)
...
A similar sentence is present in the 'Invocation from super' section of
the descriptor HOWTO, where it is already correct.
2021-11-20 17:55:35 +01: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
31b3a70edb
[doc] bpo-45680: Disambiguate ``__getitem__`` and ``__class_getitem__`` in the data model (GH-29389)
...
The documentation explaining Python's data model does not adequately explain
the differences between ``__getitem__`` and ``__class_getitem__``, nor does it
explain when each is called. There is an attempt at explaining
``__class_getitem__`` in the documentation for ``GenericAlias`` objects, but
this does not give sufficient clarity into how the method works. Moreover, it
is the wrong place for that information to be found; the explanation of
``__class_getitem__`` should be in the documentation explaining the data model.
This PR has been split off from GH-29335.
2021-11-18 16:54:25 +01:00
Arthur Milchior
d9c1868c25
bpo-45583: Correct datamodel documentation of int() (GH-29182)
...
It should be noted that this part of the documentation is redundant with
function.rst's documentation of int. This one was correctly updated with Python 3.8.
2021-10-28 21:48:37 +02:00
Serhiy Storchaka
4f05f15d7b
[docs] Improve the markup of powers (GH-28598)
2021-09-28 22:40:57 +02:00
Raymond Hettinger
94b462686b
bpo-45198: __set_name__ documentation not clear about its usage with non-descriptor classes (GH-28439)
2021-09-18 01:49:43 -05:00
Pablo Galindo Salgado
ab327f2929
bpo-44964: Correct the note about the f_lasti field (GH-28208)
2021-09-10 17:53:42 +02:00
Raymond Hettinger
fa15df77f0
bpo-45104: Clarify when __init__ is called (GH-28210)
2021-09-07 18:04:39 +02:00
Pablo Galindo Salgado
fa2c0b85a8
bpo-44964: Add a note explaining the new semantics of f_last_i in frame objects (GH-28200)
2021-09-07 12:18:54 +01:00
William Chargin
80f33f266b
bpo-41706: Fix special method invocation docs to mention using type() (GH-22084)
2021-08-04 13:43:06 -07:00
Ammar Askar
9c3eaf88dc
bpo-43950: Add documentation for PEP-657 (GH-27047)
...
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2021-07-13 01:29:39 +01:00
Pablo Galindo
8363c53369
bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052)
2021-07-07 14:20:49 +01:00
Illia Volochii
a1092f6249
bpo-43216: Remove @asyncio.coroutine (GH-26369)
...
Remove the @asyncio.coroutine decorator
enabling legacy generator-based coroutines to be compatible with async/await
code; remove asyncio.coroutines.CoroWrapper used for wrapping
legacy coroutine objects in the debug mode.
The decorator has been deprecated
since Python 3.8 and the removal was initially scheduled for Python 3.10.
2021-07-01 15:13:59 +02:00
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
Ryan Hileman
9a2c2a9ec3
bpo-42800: add audit hooks for f_code and tb_frame (GH-24182)
...
Accessing the following attributes will now fire PEP 578 style audit hooks as ("object.__getattr__", obj, name):
* PyTracebackObject: tb_frame
* PyFrameObject: f_code
* PyGenObject: gi_code, gi_frame
* PyCoroObject: cr_code, cr_frame
* PyAsyncGenObject: ag_code, ag_frame
Add an AUDIT_READ attribute flag aliased to READ_RESTRICTED.
Update obsolete flag documentation.
2021-04-30 00:15:55 +01:00
Géry Ogam
a1a5e3c4c8
Fix a typo in datamodel reference document (GH-24930)
2021-04-25 14:13:19 -07:00
Victor Stinner
553ee2781a
bpo-43682: Make staticmethod objects callable (GH-25117)
...
Static methods (@staticmethod) are now callable as regular functions.
2021-04-12 00:21:22 +02:00
Ken Jin
5143fd15b4
Update pattern matching docs for changes to the PEP ( #25185 )
...
See:
- https://github.com/python/peps/pull/1909 (__match_args__ must be a tuple)
- https://github.com/python/peps/pull/1908 (allow keyword patterns for int(x) etc.)
2021-04-06 09:03:00 -07:00
Daniel F Moisset
a22bca6b1e
bpo-42128: Add documentation for pattern matching (PEP 634) ( #24664 )
...
This is a first edition, ready to go out with the implementation. We'll iterate during the rest of the period leading up to 3.10.0.
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Fidget-Spinner <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Raymond Hettinger <1623689+rhettinger@users.noreply.github.com>
Co-authored-by: Guido van Rossum <guido@python.org>
2021-02-28 20:08:38 -08:00
Andre Delfino
96a09df644
[doc] Fix a few margins due to bad markup (GH-23619)
2020-12-17 09:25:55 -08:00
Andre Delfino
95f710c557
bpo-6761: Enhance __call__ documentation (GH-7987)
2020-10-27 17:18:57 +01:00
Brett Cannon
3c69f0c933
bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874)
...
See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython.
Automerge-Triggered-By: GH:brettcannon
2020-10-21 16:24:38 -07:00
kpinc
f8b1ccd63c
Fix bpo-39416: Change "Numeric" to lower case; an english word, not a class name (GH-22867)
...
This is a trivial fix to [bpo-39416](), which didn't come up until it was already committed
```
Change "Numeric" to "numeric".
I believe this is trivial enough to not need an issue or a NEWS entry, although
I'm unclear on what branches the original pull request received backports.
```
Automerge-Triggered-By: GH:merwok
2020-10-21 13:34:15 -07:00
kpinc
c60394c7fc
bpo-39416: Document some restrictions on the default string representations of numeric classes (GH-18111)
...
[bpo-39416](): Document string representations of the Numeric classes
This is a change to the specification of the Python language.
The idea here is to put sane minimal limits on the Python language's default
representations of its Numeric classes. That way "Marty's Robotic Massage Parlor
and Python Interpreter" implementation of Python won't do anything too
crazy.
Some discussion in the email thread:
Subject: Documenting Python's float.__str__()
https://mail.python.org/archives/list/python-dev@python.org/thread/FV22TKT3S2Q3P7PNN6MCXI6IX3HRRNAL/
2020-10-21 10:13:50 -07:00
Saiyang Gou
3f7e990fd4
bpo-41192: Add documentation of undocumented audit events (GH-21308)
2020-10-20 15:23:15 -04:00
Brett Cannon
d02d824e05
bpo-41584: clarify when the reflected method of a binary arithemtic operator is called ( #22505 )
2020-10-05 09:42:21 -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
Heshy Roskes
ef33712baa
Fix typo in object.__format__ docs (GH-19504)
2020-04-25 21:57:09 -04:00
Mathieu Dupuy
c49016e67c
fix comma location in various places (GH-19233)
2020-03-30 14:28:25 -07:00
Lahfa Samy
59c644eaa7
bpo-39879: Update datamodel docs to include dict ordering (GH-19006)
...
Co-authored-by: furkanonder <furkantahaonder@gmail.com>
2020-03-26 09:54:04 -05:00
Caleb Donovick
e59334ebc9
bpo-17422: slightly more precise language (GH-18682)
2020-03-06 10:20:48 -08:00
MojoVampire
469325c30e
bpo-35712: Make using NotImplemented in a boolean context issue a deprecation warning (GH-13195)
2020-03-03 20:50:17 +02:00
ananthan-123
fbe2e0bb8a
bpo-17422: Language reference should specify restrictions on class namespace ( #18559 )
...
The language reference now specifies restrictions on class namespaces. Adapted from a patch by Ethan Furman.
2020-02-22 09:56:01 -08:00
alclarks
7de617455e
bpo-15243: Document __prepare__ as classmethod (GH-17124)
2020-01-25 21:49:58 +03:00
HongWeipeng
abc0c4fa99
Fix the parameter list of object. _rpow_ (#GH-16477)
2020-01-05 17:20:29 -05:00
Batuhan Taşkaya
d587272fe3
bpo-38316: Fix co_stacksize documentation (GH-16983)
2019-12-15 23:02:47 +01:00
Tal Einat
02519f75d1
bpo-38524: clarify example a bit and improve formatting (GH-17406)
2019-11-28 07:22:09 +02:00
Florian Dahlitz
1bddf890e5
bpo-38524: document implicit and explicit calling of descriptors' __set_name__ (GH-17364)
2019-11-27 10:46:40 +02:00
alclarks
4544e78ec4
bpo-25866: Minor cleanups to "sequence" in docs (GH-17177)
2019-11-17 14:00:43 -08:00
Géry Ogam
4c155f738d
bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)
2019-10-29 00:04:01 -07:00
Steve Dower
a39a4c7439
bpo-37913: Link to NotImplemented from new docs (GH-15860)
2019-09-10 15:25:12 +01:00
Jeroen Demeyer
009ef2955d
bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383)
2019-09-10 15:01:13 +01:00
Raymond Hettinger
0dac68f1e5
bpo-36743: __get__ is sometimes called without the owner argument ( #12992 )
2019-08-29 01:27:42 -07:00
Joannah Nanjekye
6b16d938d6
bpo-15542: Documentation incorrectly suggests __init__ called after direct __new__ call (GH-15478)
2019-08-25 23:53:11 -07:00
Serhiy Storchaka
e9c90aa431
bpo-29535: Remove promize about hash randomization of datetime objects. (GH-15269)
2019-08-24 12:49:27 +03:00
Serhiy Storchaka
bdbad71b9d
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)
2019-06-02 00:05:48 +03:00
Pablo Galindo
cd74e66a8c
bpo-37122: Make co->co_argcount represent the total number of positonal arguments in the code object (GH-13726)
2019-06-01 18:08:04 +01:00
Serhiy Storchaka
70c5f2ae6e
Use more PEP 570 syntax in the documentation. (GH-13720)
2019-06-01 11:38:24 +03:00
Pablo Galindo
ed222a74a0
Update data model docs to include missing attributes for code objects (GH-13696)
...
Include and document co_posonlyargcount and co_kwonlyargcount
2019-05-31 12:13:04 +01:00
Catherine Alvarado
5e98f05e55
bpo-36166: Change to rst datamodel file. (GH-13089)
2019-05-04 17:54:35 -04:00
Andre Delfino
a8a79cacca
Improve grammar on async context managers and shorten text (GH-12379)
2019-05-03 08:08:10 -07:00
Jules Lasne (jlasne)
1fc5bf2ff2
Doc: Fixed missing punctuation in datamodel.rst (GH-12581)
2019-03-27 11:10:33 +01:00
Martijn Pieters
b727239575
closes bpo-36188: Clean up 'unbound' method left-overs. (GH-12169)
...
Methods are always bound, and `__self__` can no longer be `NULL`
(`method_new()` and `PyMethod_New()` both explicitly check for this).
Moreover, once a bound method is bound, it *stays* bound and won't be re-bound
to something else, so the section in the datamodel that talks about accessing
an methods in a different descriptor-binding context doesn't apply any more in
Python 3.
2019-03-04 21:19:34 -08:00
Raymond Hettinger
7463884f69
Document other performance implication for __slots__ (GH-11974)
2019-02-21 03:34:04 -08:00
Pierre Glaser
df8d2cde63
bpo-35911: add cell constructor (GH-11771)
...
Add a cell constructor, expose the cell type in the types module.
2019-02-07 19:36:48 +00:00
Serhiy Storchaka
2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)
2018-12-19 08:09:46 +02:00
Andre Delfino
1ce853f377
Move __missing__ after __delitem__ in Data model. (GH-10923)
2018-12-05 21:42:44 +02:00
wim glenn
a48e0eb967
Fix outdated info in datamodel about dicts (GH-9807)
2018-11-16 20:58:19 +09:00
Andrés Delfino
c2ccac7b9f
bpo-33816: Remove outdated metaclass example (GH-7566)
2018-11-16 20:41:55 +09:00
Denis Osipov
0bee3c36d4
bpo-35119: Fix RecursionError in example of customizing module attribute access. (GH-10323)
...
https://bugs.python.org/issue35119
2018-11-06 01:53:21 +00:00
Serhiy Storchaka
913876d824
bpo-35054: Add yet more index entries for symbols. (GH-10121)
2018-10-28 13:41:26 +02:00
Serhiy Storchaka
ddb961d2ab
bpo-35054: Add more index entries for symbols. (GH-10064)
2018-10-26 09:00:49 +03:00
Berker Peksag
3c1b590472
Fix HTML formatting in datamodel.rst (GH-8693)
2018-08-06 23:52:49 +03:00
Zach Mitchell
00818c8ffd
Fix typo in datamodel.rst (GH-6964)
...
This is a simple grammatical fix correcting "...object whose `__self__` attributes is ..." to "...object whose `__self__` attribute is ...".
2018-06-02 07:29:47 -07:00
Serhiy Storchaka
f5e7b1999f
bpo-23722: Raise a RuntimeError for absent __classcell__. (GH-6931)
...
A DeprecationWarning was emitted in Python 3.6-3.7.
2018-05-20 08:48:12 +03:00
Serhiy Storchaka
8ae8e6af37
bpo-23722: Fix docs for future __classcell__ changes. (GH-6999)
2018-05-20 08:13:52 +03:00
Ivan Levkivskyi
bd5f96581b
bpo-32717: Document PEP 560 (GH-6726)
2018-05-08 19:38:41 +01:00
Serhiy Storchaka
496431ffb6
bpo-26701: Improve documentation for the rounding special methods. ( #6054 )
2018-03-10 17:18:32 +02:00
Eric Appelt
308eab979d
bpo-26701: Add documentation for __trunc__ (GH-6022)
...
`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.
2018-03-10 18:44:12 +10:00
Nick Coghlan
aec7532ed3
bpo-30579: Docs for dynamic traceback creation (GH-5653)
2018-02-13 18:10:58 +10:00
Cheryl Sabella
d1f318105b
bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-4754)
...
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).
2018-02-05 12:03:22 +10:00
Cheryl Sabella
85527cf50a
bpo-27505: Add change notes in module attribute docs (GH-5320)
...
Make it clear that setting __class__ on a module has worked since 3.5,
but support for __getattr__ and __dir__ on module instances requires 3.7+
Patch by Cheryl Sabella.
2018-01-27 12:40:52 +10:00
Antoine Pitrou
4b965930e8
bpo-32377: improve __del__ docs and fix mention about resurrection ( #4927 )
...
* Fix #32377 : improve __del__ docs and fix mention about resurrection
* Mention that CPython only calls __del__ once.
2017-12-19 19:48:45 +01:00
Ivan Levkivskyi
5364b5cd75
bpo-32225: Implementation of PEP 562 ( #4731 )
...
Implement PEP 562: module __getattr__ and __dir__.
The implementation simply updates module_getattro and
module_dir.
2017-12-14 11:59:44 +01:00