snowy
snowy copied to clipboard
`filter` method argument in snowy is a reserved keyword and method in Python
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 = _
Thanks for the report, I agree that this should be fixed.