(a==b) ? 'Yes' : 'No'
Pierre Quentel
quentel.pierre at wanadoo.fr
Tue Mar 30 15:38:08 EDT 2010
On 30 mar, 21:19, John Bokma <j... at castleamber.com> wrote:
> Robert Fendt <no.s... at local.local> writes:
> > In fact, the syntax just shouts 'do [...] unless' to me. And
> > that's so strong a Perl-ism I cannot quite express how ugly I
> > actually find it...
>
> And
>
> a == b and 'Yes' or 'No'
>
> isn't a Perl-ism?
>
> Sheesh, this group would be so much nicer without the constant dragging
> in of Perl to make a point. On top of that, do { } unless blocks are
> not idomatic in Perl. Perl Best Practices even clearly states to *never*
> use unless.
>
> --
> John Bokma j3b
>
> Hacking & Hiking in Mexico - http://johnbokma.com/http://castleamber.com/- Perl & Python Development
I'm surprised nobody proposed a solution with itertools ;-)
- Pierre
More information about the Python-list
mailing list