Will.Whim

A weblog by Will Fitzgerald

Things that are wrong with Python (2): return values

Python doesn’t return values by default.

This is wrong. The last value should always be returned.

Advertisements

One response to “Things that are wrong with Python (2): return values

  1. Mike August 7, 2009 at 7:28 pm

    No, no, no, no, no! As PEP20 says, “Explicit is better than implicit.” There is no need for such magic. Say what you mean. Not bothering with a return statement should mean the closest thing to nothing-returned as you can get.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: