snowy icon indicating copy to clipboard operation
snowy copied to clipboard

`filter` method argument in snowy is a reserved keyword and method in Python

Open den-run-ai opened this issue 4 years ago • 1 comments

filter method argument in snowy is a reserved keyword and method in Python. This messes up both syntax highlighting, but also unintentionally can result in code that overwrites the reserved keyword.

https://docs.python.org/3/library/functions.html#filter

print(list(filter(any, [[0,1],[1,0],[1,1],[0,0]]))) # [[0, 1], [1, 0], [1, 1]]
_ = filter
filter = map
print(list(filter(any, [[0,1],[1,0],[1,1],[0,0]]))) # [True, True, True, False]
filter = _

den-run-ai avatar Aug 05 '20 14:08 den-run-ai

Thanks for the report, I agree that this should be fixed.

prideout avatar Aug 05 '20 16:08 prideout