[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-12 Thread Neil Muller
On Thu, 13 Jan 2022 at 02:31, Steven Barker wrote: > > While f-strings in class scope could theoretically be valid docstrings a lot > of the time, the equivalent situation for function docstrings is much less > positive. A function like this the one below obviously problematic, since the >

[Python-Dev] Re: PEP 677 (Callable Type Syntax): Final Call for Comments

2022-01-12 Thread Dennis Sweeney
Like others expressed, I don't like the idea of the typing and non-typing parts of Python separating. Has anyone considered adding a new special method like `__arrow__` or something, that would be user-definable, but also defined for tuples and types as returning a Callable? For example `int

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-12 Thread Steven Barker
On Wed, Jan 12, 2022 at 2:58 AM Neil Muller wrote: > Having something that looks like it sets the docstring, but silently > doesn't is very surprising, though. Linters can warn about this, but > linters are not a universal fix, and this is something that > superficially looks entirely

[Python-Dev] PEP 677 (Callable Type Syntax): Final Call for Comments

2022-01-12 Thread Steven Troxler
Hello all, We’d like to make a last call for discussion on PEP 677: Callable Type Syntax [1] before sending this to the Steering Council. For context, PEP 677 proposes an arrow-like callable syntax for python: ``` (int, str) -> bool # equivalent to Callable[[int, str], bool] ``` Thanks

[Python-Dev] Re: Suggestion: a little language for type definitions

2022-01-12 Thread Steven D'Aprano
TL;DR: declaration only syntax is a non-starter. Even if we tried to add specialised syntax that only appears in annotations, it would become a regular Python expression almost immediately. On Sun, Jan 09, 2022 at 08:42:14AM -0800, Christopher Barker wrote: > Is it more clear for readers to

[Python-Dev] Re: PEP 646 (Variadic Generics): final call for comments

2022-01-12 Thread Guido van Rossum
On Wed, Jan 12, 2022 at 4:57 AM Petr Viktorin wrote: > Matthew Rahtz wrote: > > Hi everyone, > > > > We've got to the stage now with PEP 646 that we're feeling pretty happy > > with it. So far though we've mainly been workshopping it in typing-sig, > so > > as PEP 1 requires we're asking for

[Python-Dev] Re: PEP 646 (Variadic Generics): final call for comments

2022-01-12 Thread Petr Viktorin
Matthew Rahtz wrote: Hi everyone, We've got to the stage now with PEP 646 that we're feeling pretty happy with it. So far though we've mainly been workshopping it in typing-sig, so as PEP 1 requires we're asking for some feedback here too before submitting it to the steering council. If you

[Python-Dev] Re: [PSA] OpenSSL 3.0 support is preliminary and experimental

2022-01-12 Thread Christian Heimes
On 10/01/2022 17.01, Miro Hrončok wrote: On 09. 01. 22 19:39, Christian Heimes wrote: Hi, I would like to remind everybody that Python's support for OpenSSL 3.0 is preliminary [1]. Python compiles with OpenSSL 3.0.0 and simple code kinda works. However there are known performance

[Python-Dev] Re: Minor inconvenience: f-string not recognized as docstring

2022-01-12 Thread Neil Muller
On Wed, 12 Jan 2022 at 00:12, Eric V. Smith wrote: > > On 1/11/2022 3:44 PM, Brett Cannon wrote: > > > > >>> class C: 'foo' > ... > >>> C.__doc__ == 'foo' > True > > >>> class C: f'foo' > ... > >>> C.__doc__ == 'foo' > False > >>> C.__doc__ is None > True > > And there's a test to make sure