Feature suggestion -- return if true

Ethan Furman ethan at stoneleaf.us
Wed Apr 13 01:48:31 CEST 2011


Westley Martínez wrote:
> On Tue, 2011-04-12 at 16:06 -0700, Ethan Furman wrote:
>> --> def func():
>> -->     var1 = something()
>> -->     var2 = something_else('this')
>> -->     return? var1.hobgle(var2)
>> -->     var3 = last_resort(var1)
>> -->     return var3.wiglat(var2)
> 
> The question mark makes the programmer look like he wasn't sure of what
> he was doing at the time.  "Hmm, should I return this object or not?"
> 

Yeah, I'm definitely -1 on the ?, as well as -1 on the idea.  All other 
major flow control uses indentation, and this does not.

~Ethan~



More information about the Python-list mailing list