MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/28utww/writing_better_python_code/ciexo3l/?context=3
r/Python • u/kracekumar • Jun 23 '14
126 comments sorted by
View all comments
2
Why is that called normal code? I would think pythonic is normal for python. I would call that bad code or unpythonic.
Also your default value for functions with a mutable type doesnt highlight the side effect that it causes and why you initialize to None.
4 u/kracekumar Jun 23 '14 Agreed normal code should have been named as bad code. Modified in the gist.
4
Agreed normal code should have been named as bad code. Modified in the gist.
2
u/elb0w Jun 23 '14
Why is that called normal code? I would think pythonic is normal for python. I would call that bad code or unpythonic.
Also your default value for functions with a mutable type doesnt highlight the side effect that it causes and why you initialize to None.