Scott David Daniels wrote:
Roy Smith wrote:
... How our tools warp our thinking.
That is what it means to be human. I can think of no better reason
for a programmer to regularly learn languages: "our tools warp our
thinking." A programmer is a professionally warped thinker.
--Scott David Daniels
Roy Smith wrote:
... How our tools warp our thinking.
That is what it means to be human. I can think of no better reason
for a programmer to regularly learn languages: "our tools warp our
thinking." A programmer is a professionally warped thinker.
--Scott David Daniels
[EMAIL PROTECTED]
--
http:
Robert Kern wrote:
Sunnan wrote:
(((0.0 < a) < 1.0) < b ) < 2.0
Go on. Try it with a bunch of different values.
My bad. (Of course. The subexpressions must return booleans, not the
largest number. It couldn't work any other way.) Egg on my face, and all
that (figuratively speaking).
Not used to
Sunnan wrote:
Terry Reedy wrote:
Gee, what about 0.0 < a < 1.0 < b < 2.0? I see both as synthesized
multinary operators, but your are right in that this combination does
act differently than a+b+c.
Is < really multinary in python? It looks binary to me, just like +.
(a+b)+c
(((0.0 < a) < 1.0) <
Terry Reedy wrote:
Gee, what about 0.0 < a < 1.0 < b < 2.0? I see both as synthesized
multinary operators, but your are right in that this combination does act
differently than a+b+c.
Is < really multinary in python? It looks binary to me, just like +.
(a+b)+c
(((0.0 < a) < 1.0) < b ) < 2.0
Sunn
The good ol' DiveInto says:
http://diveintopython.org/power_of_introspection/and_or.html#d0e9975
http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52310
Diez B. Roggisch wrote:
> praba kar wrote:
>
> > Dear All,
> > I am new to Python. I want to know how to
> > work with ternary opera
Terry Reedy wrote:
> "Carl Banks" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >> A unary operator has one operand; a binary operator has two
operands;
> >> ternary operator has three operands. Python has none built-in,
> >
> > Not so fast, my friend. What about the expression
In article <[EMAIL PROTECTED]>,
"Carl Banks" <[EMAIL PROTECTED]> wrote:
> Terry Reedy wrote:
> > "praba kar" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > Dear All,
> > >I am new to Python. I want to know how to
> > > work with ternary operator in Python. I cannot
>
"Carl Banks" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> A unary operator has one operand; a binary operator has two operands;
>> ternary operator has three operands. Python has none built-in,
>
> Not so fast, my friend. What about the expression "0.0 < a < 1.0"?
Gee, what a
Terry Reedy wrote:
> "praba kar" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Dear All,
> >I am new to Python. I want to know how to
> > work with ternary operator in Python. I cannot
> > find any ternary operator in Python. So Kindly
> > clear my doubt regarding this
>
Ron_Adam wrote:
I've used boolean opperations to do it.
result = (v == value) * first + (v != value) * second
Same as:
if v == value: result = first else: result = second
No, it isn't, because it isn't short circuiting. If first or second had
side effects, then the two would not be equiv
"praba kar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Dear All,
>I am new to Python. I want to know how to
> work with ternary operator in Python. I cannot
> find any ternary operator in Python. So Kindly
> clear my doubt regarding this
A unary operator has one operand
On Fri, 1 Apr 2005 08:24:42 +0100 (BST), praba kar
<[EMAIL PROTECTED]> wrote:
>Dear All,
>I am new to Python. I want to know how to
>work with ternary operator in Python. I cannot
>find any ternary operator in Python. So Kindly
>clear my doubt regarding this
>
>
>
>__
John Roth wrote:
"praba kar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Dear All,
I am new to Python. I want to know how to
work with ternary operator in Python. I cannot
find any ternary operator in Python. So Kindly
clear my doubt regarding this
There isn't one, and ther
praba kar wrote:
> Dear All,
> I am new to Python. I want to know how to
> work with ternary operator in Python. I cannot
> find any ternary operator in Python. So Kindly
> clear my doubt regarding this
There is no ternary operator in python. There are several idioms that can be
used to em
"praba kar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Dear All,
I am new to Python. I want to know how to
work with ternary operator in Python. I cannot
find any ternary operator in Python. So Kindly
clear my doubt regarding this
There isn't one, and there won't be one unle
praba kar <[EMAIL PROTECTED]> wrote:
> Dear All,
> I am new to Python. I want to know how to
> work with ternary operator in Python. I cannot
> find any ternary operator in Python.
You answered your own question; there is no ternary operator in Python.
There was a major debate on this new
On Apr 1, 2005 8:10 PM, Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Sean Kemplay wrote:
>
> > You could use
> >
> > condition and consequent or alternative
> >
> > I use it
>
> You should do so cautiously, since if consequent is false, it will not
> behave as suspected. Not to mention that it'
Sean Kemplay wrote:
You could use
condition and consequent or alternative
I use it
You should do so cautiously, since if consequent is false, it will not
behave as suspected. Not to mention that it's quite unreadable.
--
Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/
San
praba kar wrote:
Dear All,
I am new to Python. I want to know how to
work with ternary operator in Python. I cannot
find any ternary operator in Python.
http://www.python.org/peps/pep-0308.html
--
http://mail.python.org/mailman/listinfo/python-list
You could use
condition and consequent or alternative
I use it
Sean
On Apr 1, 2005 5:24 PM, praba kar <[EMAIL PROTECTED]> wrote:
> Dear All,
> I am new to Python. I want to know how to
> work with ternary operator in Python. I cannot
> find any ternary operator in Python. So Kindly
> cle
21 matches
Mail list logo