On 2011-04-12, James Mills <prolo...@shortcircuit.net.au> wrote:
> On Tue, Apr 12, 2011 at 9:17 AM, zildjohn01 <zildjoh...@gmail.com> wrote:
>> This is an idea I've had bouncing around in my head for a long time
>> now. I propose the following syntax:
>
> Maybe this is more appropriare for the python-ideas list ?
>
>> ?? ??return? expr
>
> This syntax does not fit well within python ideology.
>
>> be expanded to
>>
>> ?? ??_temp = expr
>> ?? ??if _temp: return _temp
>
> This could be simplified to just:
>
> return expr or None

How is that the same?

  return? something()                  return something() or None
  return? somethingelse()              return somethingelse() or None
  log("didn't find an answer")         log("didn't find an answer")         
  raise ValueError                     raise ValueError

Are you saying the two snippets above are equivalent?

-- 
Grant


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to