On Nov 27, 3:01 am, Erik Jones <[EMAIL PROTECTED]> wrote:
> On Nov 25, 2007, at 9:49 PM, Donn Ingle wrote:
>
>
>
> >>> if 0 > x < 20: print "within"
> >> That means "if x LESS THAN 0 and x < 20".
> > Oh, bugger. It's tricky.
> >> So try
> >> if 0 < x < 20:
> > Thanks. I was flipping signs in my
On Nov 26, 2007, at 2:29 AM, Peter Otten wrote:
> Donn Ingle wrote:
>
>>> x in range(1,20) ?
>> Sure, that's okay, but it has clarity issues, and is calling a func.
>
> and it requires that x is integral (1.0 is in the range, 1.001 is
> not),
> and becomes dog slow when the range gets larger. No
On Nov 25, 2007, at 9:49 PM, Donn Ingle wrote:
>>> if 0 > x < 20: print "within"
>> That means "if x LESS THAN 0 and x < 20".
> Oh, bugger. It's tricky.
>> So try
>> if 0 < x < 20:
> Thanks. I was flipping signs in my tests, but I guess I flipped
> both and got
> myself all confused.
>
>> L
> The output of the following program might help:
Hey, nifty! Thanks Paddy.
\d
--
http://mail.python.org/mailman/listinfo/python-list
Donn Ingle wrote:
>> x in range(1,20) ?
> Sure, that's okay, but it has clarity issues, and is calling a func.
and it requires that x is integral (1.0 is in the range, 1.001 is not),
and becomes dog slow when the range gets larger. Not a good idea.
Peter
--
http://mail.python.org/mailman/listin
On Nov 25, 6:49 pm, Donn Ingle <[EMAIL PROTECTED]> wrote:
> Sheesh, I've been going spare trying to find how to do this short-hand:
> if 0 > x < 20: print "within"
>
> So that x must be > 0 and < 20.
>
> I usually do:
> if x > 0 and x < 20: print "within"
>
> What's the rule? Does it even exist?
>
>> if 0 > x < 20: print "within"
> That means "if x LESS THAN 0 and x < 20".
Oh, bugger. It's tricky.
> So try
> if 0 < x < 20:
Thanks. I was flipping signs in my tests, but I guess I flipped both and got
myself all confused.
> Likely manuals: Tutorial & Reference
> Tutorial: check contents,
>
> if 0 > x: print "within"
>
Ah, I didn't know you could one could use the sarcasm.xml module and then
use tags to influence Python commands. Most interesting...
import sarcasm.xml
I.fartIn( Your.Direction( general ) )
:D
\d
--
http://mail.python.org/mailman/listinfo/python-list
Mel wrote:
> if 0 < x < 20:
> ?
I take it I was tripping then. That's okay, it seemed a little too weird
anyway :)
\d
--
http://mail.python.org/mailman/listinfo/python-list
> you mean : 0 < x < 20 ?
Yes. I had gotten the impression that there was some Python form of:
if NUMBER test VAR test NUMBER:
Part of the question was to discover if I was smoking my socks :)
> x in range(1,20) ?
Sure, that's okay, but it has clarity issues, and is calling a func.
>> but then a
On Sun, 2007-11-25 at 20:49 +0200, Donn Ingle wrote:
> Sheesh, I've been going spare trying to find how to do this short-hand:
> if 0 > x < 20: print "within"
>
if 0 > x: print "within"
--
http://mail.python.org/mailman/listinfo/python-list
On Nov 26, 5:49 am, Donn Ingle <[EMAIL PROTECTED]> wrote:
> Sheesh, I've been going spare trying to find how to do this short-hand:
> if 0 > x < 20: print "within"
That means "if x LESS THAN 0 and x < 20".
>
> So that x must be > 0 and < 20.
So try
if 0 < x < 20:
>
> I usually do:
> if x >
Donn Ingle a écrit :
> Sheesh, I've been going spare trying to find how to do this short-hand:
> if 0 > x < 20: print "within"
you mean : 0 < x < 20 ?
or
x in xrange(1,20) ?
>
> So that x must be > 0 and < 20.
>
> I usually do:
> if x > 0 and x < 20: print "within"
>
> What's the rule? Does
Donn Ingle wrote:
> Sheesh, I've been going spare trying to find how to do this short-hand:
> if 0 > x < 20: print "within"
>
> So that x must be > 0 and < 20.
>
> I usually do:
> if x > 0 and x < 20: print "within"
>
> What's the rule? Does it even exist?
if 0 < x < 20:
?
Mel.
-
Sheesh, I've been going spare trying to find how to do this short-hand:
if 0 > x < 20: print "within"
So that x must be > 0 and < 20.
I usually do:
if x > 0 and x < 20: print "within"
What's the rule? Does it even exist?
I read something like it recently on the list but can't find it, that's
whe
15 matches
Mail list logo