If true pythonista is in doubt he/she will turn to holy book of The Python Language Reference for truth, guidance and salvation. As per documentation, every devoted follower keeps it under pillow .
In this case I was not able to find truth. However, guidance is quite clear: every code snippet that I have encountered so far is using multiple returns. Like in Built-in functions all(), any() or Built-in Types hashing float etc.
The smart people who wrote these snippets were well aware that millions on eager young pythonistas will consider these examples as best practices for Python code.
Conclusion is simple: using multiple returns is pythonic
One can be tempted to derive from that: using multiple results and one return is non-pythonic. I am not commited to that yet. In order to claim that I need to read all snippets provided and only after that make conclusion.
In this case I was not able to find truth. However, guidance is quite clear: every code snippet that I have encountered so far is using multiple returns. Like in Built-in functions all(), any() or Built-in Types hashing float etc.
The smart people who wrote these snippets were well aware that millions on eager young pythonistas will consider these examples as best practices for Python code.
Conclusion is simple: using multiple returns is pythonic
One can be tempted to derive from that: using multiple results and one return is non-pythonic. I am not commited to that yet. In order to claim that I need to read all snippets provided and only after that make conclusion.
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.