Serhiy Storchaka writes:
> The advantage is that you cannot accidentally turn a function into a
> generator by adding "yield".
Can't mypy catch this?
> Asynchronous functions are more reliable. "async" is mandatory, and if
> you do not await the result of an asynchronous function call you
01.06.22 16:59, Chris Angelico пише:
On Wed, 1 Jun 2022 at 23:55, Serhiy Storchaka wrote:
The advantage is that you cannot accidentally turn a function into a
generator by adding "yield". If the result of the call is ignored (it is
expected to be None), this bug can live a long time. It is a
On 6/1/2022 9:59 AM, Chris Angelico wrote:
On Wed, 1 Jun 2022 at 23:55, Serhiy Storchaka wrote:
31.05.22 16:21, Chris Angelico пише:
On Tue, 31 May 2022 at 23:00, Aaron L via Python-ideas
wrote:
After getting used to writing async functions, I’ve been wanting use a similar
syntax to
On Wed, 1 Jun 2022 at 23:55, Serhiy Storchaka wrote:
>
> 31.05.22 16:21, Chris Angelico пише:
> > On Tue, 31 May 2022 at 23:00, Aaron L via Python-ideas
> > wrote:
> >> After getting used to writing async functions, I’ve been wanting use a
> >> similar syntax to declare generator functions.
> >
31.05.22 16:21, Chris Angelico пише:
On Tue, 31 May 2022 at 23:00, Aaron L via Python-ideas
wrote:
After getting used to writing async functions, I’ve been wanting use a similar
syntax to declare generator functions.
What's the advantage? You can just use normal function syntax to
define
On the theme of the addition of pip operators to indicate union, I was
wondering what people think of using the following shortcuts for type hints.
* type[] be a short-hand for List[type]
* [type1, type2, type3] be a shorthand for Tuple[type1, type2, type3]
* similar ideas for dictionaries and
fjwillemsen--- via Python-ideas writes:
> Of course, such bugs do not occur solely due to the lack of a
> raised errors on negative multiplication: in this case, a
> combination of a faulty assumption on the programmers' part and
> Python's lack of strict typing.
I'll take that bait: did