[issue45090] Add pairwise to What's New in Python 3.10; mark it as new in itertools docs

2021-09-02 Thread Luciano Ramalho
New submission from Luciano Ramalho : Thanks for adding `itertools.pairwise()`! Let's make it easier to find by mentioning it in "What's New in Python 3.10" and also marking it as "New in Python 3.10" in the `itertools` module documentation. -- assignee: do

[issue43378] Pattern Matching section in tutorial refers to | as or

2021-03-02 Thread Luciano Ramalho
New submission from Luciano Ramalho : Section 4.6. "match Statements" of the Python 3.10 tutorial says: """ You can combine several literals in a single pattern using | (β€œor”): """ For someone just learning Python, this may suggest that | is always &quo

[issue43378] Pattern Matching section in tutorial refers to | as

2021-03-02 Thread Luciano Ramalho
Change by Luciano Ramalho : -- nosy: ramalho priority: normal severity: normal status: open title: Pattern Matching section in tutorial refers to | as ___ Python tracker <https://bugs.python.org/issue43

[issue42781] functools.cached_property docs should explain that it is non-overriding

2020-12-29 Thread Luciano Ramalho
Luciano Ramalho added the comment: > FYI, the usual term is "data descriptor" instead of "overriding descriptor". Yes, the Python docs are consistent in always using "data descriptor", but I've adopted "overriding descriptor" from Martelli's Python

[issue42781] functools.cached_property docs should explain that it is non-overriding

2020-12-29 Thread Luciano Ramalho
New submission from Luciano Ramalho : functools.cached_property is a great addition to the standard library, thanks! However, the docs do not say that @cached_property produces a non-overriding descriptor, in contrast with @property. If a user replaces a @property with a @cached_property

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-08-02 Thread Luciano Ramalho
Luciano Ramalho added the comment: The merged PR that fixed https://bugs.python.org/issue40979 also fixes this issue. It is now documented that these protocols are runtime checkable, with caveats. -- ___ Python tracker <https://bugs.python.

[issue40979] typing module docs: keep text, add subsections

2020-08-01 Thread Luciano Ramalho
Luciano Ramalho added the comment: I have incorporated Guido's suggestions and added additional subsections to make it easier to navigate the page. I also added notes that fix the issue https://bugs.python.org/issue40978 β€” "Document that typing.SupportsXXX protocols are runtime chec

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-08-01 Thread Luciano Ramalho
Luciano Ramalho added the comment: I have added a note about the protocols decorated with `@runtime_checkable` to the `Procools` section of the reorganized `typing.rst` in https://bugs.python.org/issue40979. I also expanded the note about the caveats of `@runtime_checkable` in its entry

[issue40979] typing module docs: keep text, add subsections

2020-07-20 Thread Luciano Ramalho
Luciano Ramalho added the comment: Reviewers, besides adding section titles and reordering the entries, I made only these changes to the text: - entry for IO, TextIO, BinaryIO: added sentence "These types are in the ``typing.io`` namespace." - entry for Pattern, Match: adde

[issue40979] typing module docs: keep text, add subsections

2020-07-20 Thread ramalho
ramalho added the comment: This is my proposal for sections to replace the existing "Classes, functions, and decorators" section. The names are sorted within each section. # Special typing primitives Any Callable ClassVar ForwardRef

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-07-13 Thread ramalho
ramalho added the comment: After experimenting with theses protocols, I believe the user community is better served by leaving undocumented the fact that they are runtime checkable, because their runtime results are inconsistent with how Mypy handles them, producing both false positives

[issue40979] typing module docs: keep text, add subsections

2020-06-16 Thread ramalho
ramalho added the comment: Sorry, there was an editing mistake above. Where I wrote: - AnyStr: should be listed right after TypeVar, NoReturn, NewType I meant to write: - AnyStr: should be listed right after TypeVar - NoReturn, NewType: both belong with "Special Constructs" as w

[issue40979] typing module docs: keep text, add subsections

2020-06-16 Thread ramalho
ramalho added the comment: Thanks, I am happy to submit a PR. Before I do, I'd like to discuss the subsection titles, starting from the arrangement in typing.__all__: # Special typing constructs (source comment is: "Super-special typing primitives") Any Callable ClassVar Final

[issue40979] typing module docs: keep text, add subsections

2020-06-14 Thread ramalho
New submission from ramalho : The typing module documentation page has a very long section "Classes, functions, and decorators" (https://docs.python.org/3/library/typing.html#classes-functions-and-decorators) that should be split in subsections. The ordering of the entries seems

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-06-14 Thread ramalho
New submission from ramalho : The typing module documentation (https://docs.python.org/3/library/typing.html#typing.SupportsInt) does not mention that the protocols listed below are all decorated with `@runtime_checkable`. This should mentioned in the entry for each protocol and also

[issue13005] operator module docs include repeat

2011-09-18 Thread Luciano Ramalho
New submission from Luciano Ramalho luci...@ramalho.org: The operator module documentation for versions 3.2 and 3.3 includes the repeat function in a table 9.3.1. Mapping Operators to Functions [1], but fails to mention that the repeat function is deprecated and mul should be used instead

[issue1293741] doctest runner cannot handle non-ascii characters

2009-01-11 Thread Luciano Ramalho
Luciano Ramalho luci...@ramalho.org added the comment: I have confirmed everything that akaihola reports in Python 2.4, 2.5 and 2.6, but the problem is not limited to non-matching test output. It also happens with doctests with zero failures when the module is run with the -v command-line switch