Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!198.186.194.250.MISMATCH!news-xxxfer.readnews.com!textspool1.readnews.com!news-out.readnews.com!transit3.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Feature suggestion -- return if true Date: Tue, 12 Apr 2011 13:42:32 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 48 Message-ID: References: <8abff237-5ccd-4eb6-85c8-cdc9e87520b7@bl1g2000vbb.googlegroups.com> NNTP-Posting-Host: dsl.comtrol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1302615752 11452 64.122.56.22 (12 Apr 2011 13:42:32 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 12 Apr 2011 13:42:32 +0000 (UTC) User-Agent: slrn/pre0.9.9-102 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3045 On 2011-04-12, James Mills wrote: > On Tue, Apr 12, 2011 at 12:18 PM, Grant Edwards wrote: >> You stated that >> >> ??return? >> >> was equivalent to >> >> ??return or None > > This is _not_ what I said. > > Quoting from my earlier post: > > """ >> 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 > """ You just said it again: that the OP's "return? expr" is the same as "return exrp or None". It isn't. The OP's construct didn't return if expr wasn't true. Your construt does. > Please read carefully before putting words in my mouth. I wasn't putting words in your mouth. You said the same thing again in the post to whic I'm replying. > I stated very clear y that return? expr didn't seem fitting > in the python ideology as syntax for this behavior. I don't care about syntax. What you proposed doesn't have the same _semantics_ as what the OP proposed. -- Grant Edwards grant.b.edwards Yow! I'd like MY data-base at JULIENNED and stir-fried! gmail.com