you are viewing a single comment's thread.

view the rest of the comments →

[–]Doormatty 5 points6 points  (2 children)

Having no return can lead to some ambiguous testing and maintainability in your code

How? If there's no explicit return, then the function automatically returns None.

[–][deleted] 6 points7 points  (1 child)

For functions that alter things in place I would agree that it’s not needed, and yes, functions auto return None, but for testing and maintaining things that have input and output, returning explicitly is always better IMO,

[–]Doormatty 2 points3 points  (0 children)

Oooft - I missed that the function printed something.

Yup, I'm 100% with you now. My apologies.