-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Guido, and hence Python, do not favor lamba expressions. Among other things, lambdas can confuse mypy and there's no great syntactic sugar to fix this. We fix this two ways. In the simple case, we can provide a type signature using typing.cast. The a more complex case, we rewrite a nested comprehension that was written to create three lists as a simple loop to create those three lists with proper type signatures. And in the process, simplify some old code that is no longer relevant. Signed-off-by: Michael Tiemann <[email protected]>
- Loading branch information
1 parent
e5c52e1
commit b2b95b3
Showing
1 changed file
with
27 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters