20 Nov
2021
20 Nov
'21
4:11 p.m.
On Tue, Nov 16, 2021 at 10:46 PM Shantanu Jain <hauntsaninja@gmail.com> wrote:
The line between classes and functions is blurry. For example, disallowing type aliases in functions would break code like: ``` def foo(x): bar = map return bar(lambda y: y+1, x) ``` because map is actually a class (and is typed as such in typeshed).
Note that this should pass a type checker regardless of what we choose. Either `bar = map` is an alias definition or it is just a variable assignment. It shouldn't be flagged as an invalid alias definition. -- --Guido van Rossum (python.org/~guido) *Pronouns: he/him **(why is my pronoun here?)* <http://feministing.com/2015/02/03/how-using-they-as-a-singular-pronoun-can-c...>