April 25, 2012
2:44 p.m.
(sent from my phone) On Apr 25, 2012 3:01 PM, "M.-A. Lemburg" <mal@egenix.com> wrote:
Ronald Oussoren wrote:
Also, why use the proposed module-scope return instead of an
if-statement with nested definitions, this works just fine:
: def foo(): pass : : if sys.platform == 'linux': : : def linux_bar(): pass
Because this only works reasonably if you have a few lines of code to indent. As soon as you have hundreds of lines, this becomes both unreadable and difficult to edit.
OTOH the return statement becomes really hard to spot... Arnaud