python-caldav / caldav

Apache License 2.0
321 stars 95 forks source link

Pep8 create func lambda vs def #416

Closed ArtemIsmagilov closed 3 months ago

ArtemIsmagilov commented 3 months ago

https://peps.python.org/pep-0008/#programming-recommendations

ArtemIsmagilov commented 3 months ago

autopep8 generate def remove_bit(n): return n & (n - 1) in any case, it’s easier to correct the function if necessary)

ArtemIsmagilov commented 3 months ago

you can cancel the PR. no difference. it just reads more clearly

tobixen commented 3 months ago

The code isn't easy to understand in any way, it should maybe be rewritten completely. I've added some comments if nothing else. Since the code is rather obscure in any case, I think it's best to leave it with the fewest possible lines of code.