[Python-Dev] Re: Switching to Discourse

2022-07-23 Thread Steven Barker
On Thu, Jul 21, 2022 at 3:42 PM Steven Barker wrote: > So last night I tried activating mailing list mode [...] > To follow up on my own post, here's an update. I figured out that I'd done something incorrectly the first time I tried muting certain categories of posts on Discourse. I t

[Python-Dev] Re: Switching to Discourse

2022-07-21 Thread Steven Barker
On Mon, Jul 18, 2022 at 6:28 AM Petr Viktorin wrote: > On 16. 07. 22 8:48, Miro Hrončok wrote: > > On 15. 07. 22 13:18, Petr Viktorin wrote: > >> - You can use discuss.python.org's “mailing list mode” (which > >> subscribes you to all new posts), possibly with filtering and/or > >> categorizing

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

2022-01-12 Thread Steven Barker
def foo(x): f"is this a docstring? x is {x}" I'm pretty sure f-strings cannot be used as docstrings in other contexts because of how broken they'd be in functions. -- Steven Barker ___ Python-Dev mailing list -- python-dev@python.org To

[Python-Dev] Re: Function suggestion: itertools.one()

2020-07-27 Thread Steven Barker
A single-name unpacking assignment can do exactly what you want, albeit with slightly less helpful exception messages: jack, = (p for p in people if p.id == '1234') # note comma after the name jack If no value is yielded by the generator expression, you'll get "ValueError: not enough values

[Python-Dev] Re: PEP 622: Structural Pattern Matching -- followup

2020-07-07 Thread Steven Barker
On Sun, Jun 28, 2020 at 8:44 AM Jim J. Jewett wrote: > I actually like that it looks like instantiation; it seems to be saying > "Do we have the sort of object we would get from this instantiation?" > > Unfortunately, this does aggravate the confusion over whether a variable > is being used as a