Hugo van Kemenade
77b2c933ca
Python 3.14.0a6
2025-03-14 17:05:02 +02:00
Daniel Pope
e0637cebe5
gh-129349: Accept bytes in bytes.fromhex()/bytearray.fromhex() ( #129844 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-03-12 11:40:11 +01:00
Jelle Zijlstra
dc6d66f44c
gh-105499: Merge typing.Union and types.UnionType ( #105511 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2025-03-04 11:44:19 -08:00
Yuki Kobayashi
4d3a7ea354
Docs: Fix some semantic usages of iterator.__iter__ (GH-130172)
...
These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`.
2025-02-25 13:38:47 +01:00
Stan Ulbrych
3402e133ef
gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130118)
...
We had the definition of what makes a character "printable" documented in three places, giving two different definitions.
The definition in the comment on `_PyUnicode_IsPrintable` was inverted; correct that.
With that correction, the two definitions turn out to be equivalent -- but to confirm that, you have to go look up, or happen to know, that those are the only five "Other" categories and only three "Separator" categories in the Unicode character database. That makes it hard for the reader to tell whether they really are the same, or if there's some subtle difference in the intended semantics.
Fix that by cutting the C API docs' and the C comment's copies of the subtle details, in favor of referring to the Python-level docs. That ensures it's explicit that these are all meant to agree, and also lets us concentrate improvements to the wording in one place.
Speaking of which, borrow some ideas from the C comment, along with other tweaks, to hopefully add a bit more clarity to that one newly-centralized copy in the docs.
Also add a thorough test that the implementation agrees with this definition.
Author: Greg Price <gnprice@gmail.com>
Co-authored-by: Greg Price <gnprice@gmail.com>
2025-02-14 18:16:47 +01:00
Hugo van Kemenade
3ae9101482
Python 3.14.0a5
2025-02-11 19:16:29 +02:00
Cody Maloney
5fb019fc29
gh-129559: Add bytearray.resize() (GH-129560)
...
Add bytearray.resize() which wraps PyByteArray_Resize.
Make negative size passed to resize exception/error rather than crash in optimized builds.
2025-02-05 11:33:17 -08:00
Cheryl Sabella
5044c2245c
gh-67748: DOC:Add summary table for str methods in stdtypes.rst (GH-1709)
...
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2025-01-13 14:14:59 +01:00
Hugo van Kemenade
401bfc69d1
Python 3.14.0a3
2024-12-17 11:50:39 +02:00
Bénédikt Tran
4331832db0
gh-125420: implement Sequence.count API on memoryview objects ( #125443 )
2024-12-10 10:12:33 +00:00
Bénédikt Tran
58c753827a
gh-125420: implement Sequence.index API on memoryview objects ( #125446 )
2024-12-09 18:48:38 -08:00
Sergey B Kirpichev
987311d42e
gh-69639: Add mixed-mode rules for complex arithmetic (C-like) (GH-124829)
...
"Generally, mixed-mode arithmetic combining real and complex variables should
be performed directly, not by first coercing the real to complex, lest the sign
of zero be rendered uninformative; the same goes for combinations of pure
imaginary quantities with complex variables." (c) Kahan, W: Branch cuts for
complex elementary functions.
This patch implements mixed-mode arithmetic rules, combining real and
complex variables as specified by C standards since C99 (in particular,
there is no special version for the true division with real lhs
operand). Most C compilers implementing C99+ Annex G have only these
special rules (without support for imaginary type, which is going to be
deprecated in C2y).
2024-11-26 17:57:39 +02:00
Hugo van Kemenade
add43c3420
Python 3.14.0a2
2024-11-19 16:52:44 +02:00
Prometheus3375
5527c4051c
gh-116938: Fix dict.update docstring and remove erraneous full stop from dict documentation ( #125421 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-29 23:00:04 +00:00
Brian Schubert
dc76a4ad3c
gh-126012: Add __class_getitem__ to memoryview ( #126013 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-10-27 13:36:03 +03:00
Victorien
21ac0a7f4c
gh-116938: Clarify documentation of dict and dict.update regarding the positional argument they accept ( #125213 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-11 23:05:13 +00:00
Alex Waygood
0d9d56c4e4
gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs ( #124480 )
2024-09-25 19:29:58 +00:00
Benjamin Peterson
bb904e063d
closes gh-124016: update Unicode to 16.0.0 ( #124017 )
2024-09-13 07:47:04 -07:00
Wei-Hsiang (Matt) Wang
cf472577e2
gh-123517: Remove unnecessary `:meth:` parentheses ( #123518 )
2024-09-01 05:59:42 +01:00
Wei-Hsiang (Matt) Wang
103a0470e3
gh-123492: Remove unnecessary :func: parentheses ( #123493 )
2024-08-30 14:34:09 +03:00
Kirill Podoprigora
249b083ed8
gh-122982: Extend the deprecation period for bool inversion by two years ( #123306 )
2024-08-25 12:24:44 -07:00
smij720
967a4f1d18
Docs: Change remove to removes for consistency ( #121072 )
2024-08-07 16:30:00 +01:00
Serhiy Storchaka
1a0c7b9ba4
gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907)
2024-07-19 08:06:02 +00:00
Serhiy Storchaka
94bee45dee
gh-84978: Add float.from_number() and complex.from_number() (GH-26827)
...
They are alternate constructors which only accept numbers
(including objects with special methods __float__, __complex__
and __index__), but not strings.
2024-07-15 16:07:00 +00:00
Yuxin Wu
892e3a1b70
Update example of str.split, bytes.split ( #121287 )
...
In `{str,bytes}.strip(chars)`, multiple characters are not treated as a
prefix/suffix, but as individual characters. This may make users confuse
whether `split` has similar behavior.
Users may incorrectly expect that
`'Good morning, John.'.split(', .') == ['Good', 'morning', 'John']`
Adding a bit of clarification in the doc.
Co-authored-by: Yuxin Wu <ppwwyyxx@users.noreply.github.com>
2024-07-05 13:08:29 -07:00
sobolevn
1dc9a4f6b2
gh-121196: Document dict.fromkeys params as pos-only ( #121197 )
2024-07-01 23:27:04 +03:00
Nice Zombies
462832041e
gh-119003: Clarify slice assignments ( #119935 )
2024-06-21 11:30:50 -07:00
Serhiy Storchaka
08e65430aa
gh-111999: Fix the signature of str.format_map() ( #119540 )
2024-05-25 06:21:11 -07:00
Landon Wood
0e3c8cda1f
gh-110383: Align dict.get(), .fromkeys(), and .setdefault() docs with docstrings ( #119330 )
2024-05-22 01:15:40 +00:00
Nikita Sobolev
2f4db5a04d
gh-118803: Remove ByteString from typing and collections.abc ( #118804 )
2024-05-09 00:37:55 +01:00
trag1c
c4f9823be2
gh-118671: Updated dead ActiveState links ( #118730 )
...
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-05-08 01:06:38 -06:00
Irit Katriel
8a01fd7b9b
gh-115775: Add whatsnew entry about __static_attributes__ (GH-117909)
...
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-19 12:57:31 +02:00
Hugo van Kemenade
3375282bb8
Docs: add link roles with Sphinx extlinks ( #117850 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-15 21:22:00 +03:00
Adorilson Bezerra
56e99307c4
Doc: printf-style library/stdtype improvements ( #16741 )
2024-03-31 22:34:54 +00:00
Serhiy Storchaka
808a77612f
gh-115664: Fix ordering of more versionadded and versionchanged directives (GH-116298)
2024-03-07 10:05:03 +02:00
Erlend E. Aasland
dbe44f150c
Docs: mark up NotImplemented using the :data: role throughout the docs ( #116135 )
2024-02-29 20:46:12 +00:00
Justin Williams
d29f57f603
gh-103360: Add link in stdtypes.rst to escape sequences in lexical_analysis.rst (GH-103638)
2024-02-02 15:32:46 +02:00
Alex Waygood
4c5b9c107a
gh-101100: Improve documentation on function attributes ( #112933 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-11 12:00:42 +02:00
Alex Waygood
96f64a2b1b
gh-101100: Improve documentation of TracebackType attributes ( #112884 )
2023-12-09 22:43:53 +00:00
Alex Waygood
ed21d0c1f4
gh-101100: Improve documentation for attributes on instance methods ( #112832 )
2023-12-08 13:18:53 +00:00
Alex Waygood
e3f670e137
gh-101100: Fix most Sphinx nitpicks in the glossary and stdtypes.rst ( #112757 )
2023-12-06 08:44:06 +00:00
Terry Jan Reedy
e31d65e0b7
gh-111622: Fix doc for items views ( #112051 )
...
They are set-like even when some values are not hashable,
but work even better when all are.
2023-11-14 07:41:20 +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
Ezio Melotti
bb7923f556
gh-110631: Fix reST indentation in Doc/library ( #110685 )
...
Fix wrong indentation in the Doc/library dir.
2023-10-11 22:24:12 +02:00
P. L. Lim
f7860295b1
Add back bltin-boolean-values ref tag ( #110371 )
...
To avoid breaking downstream intersphinx via numpydoc
2023-10-04 12:56:11 -07:00
James Gerity
def828995a
fixes gh-109559: Update unicodedata for Unicode 15.1.0 (GH-109560)
...
---------
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2023-09-19 22:07:47 -07:00
Mark Dickinson
b72251de93
gh-102823: Document return type of floor division on floats ( #102824 )
...
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-07 14:20:33 +00:00
Serhiy Storchaka
f2d07d3289
gh-101100: Sphinx warnings: pick the low hanging fruits (GH-107386)
2023-07-29 08:48:10 +03:00
Serhiy Storchaka
d036db728e
gh-106892: Use roles :data: and :const: for referencing module variables (GH-106894)
2023-07-21 12:34:30 +03:00