Hacker News new | ask | show | jobs
by jessaustin 4488 days ago
Just speculating here, but a func that just ends without returning, effectively returns None, so that idiom may be considered redundant. IMHO, it's often worth the additional clarity to be redundant in this way.
2 comments

Yes, but the "Pythonic" way to do things is that "explicit is better than implicit," so I'm not sure what the original poster considers wrong with `return None`.

    In [1]: def foo(): pass
    
    In [2]: foo() is None
    Out[2]: True
I was speculating about what the original complainer meant, not about what python does... b^)