[Python-ideas] Basic toolkit for async iterators

2021-03-07 Thread Sam Frances
Apologies if this has already been raised at some point, but I wanted to raise the idea of a basic standard library toolkit for operations on async iterators. This would include versions of functions that are already in the standard library for non-async iterators, such as *map*, *filter*,*zip *et

[Python-ideas] Pattern matching in python function headers

2021-08-05 Thread Sam Frances
uot;Tuesday"}): return "It's a Tuesday, so Charles is allowed in." def allow_entry({"name": "Charles", "day": _}): return "Charles is only allowed in on a Tuesday." def allow_entr

[Python-ideas] Re: Pattern matching in python function headers

2021-08-06 Thread Sam Frances
return "Two" > > That's just a very brief list of "things to think about". In > functional languages, I like this style of function definition, but it > would need some fairly careful design to be able to translate it to a > language like Python. And honestly