Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-22 Thread Peter Otten
Lie Ryan wrote: > On 07/05/10 22:23, Adam Bark wrote: > >> >> I should add that this is how something like: >> >> if x != y: >> do_something() >> >> works, if expects a True or False (this isn't always true but works for >> comparison operators expressions such as this). >> > > "if" exp

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-22 Thread Adam Bark
On 6 July 2010 02:05, Lie Ryan wrote: > On 07/05/10 22:23, Adam Bark wrote: > > > > > I should add that this is how something like: > > > > if x != y: > > do_something() > > > > works, if expects a True or False (this isn't always true but works for > > comparison operators expressions such a

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-22 Thread Lie Ryan
On 07/05/10 22:23, Adam Bark wrote: > > I should add that this is how something like: > > if x != y: > do_something() > > works, if expects a True or False (this isn't always true but works for > comparison operators expressions such as this). > "if" expects an expression that can be con

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Steven D'Aprano
On Mon, 5 Jul 2010 07:37:12 pm Richard D. Moores wrote: > On Mon, Jul 5, 2010 at 00:55, Steve Willoughby wrote: [...] > Steve, > > Your answer seems very well-formulated. However, I've read it over > and over, but I keep getting hung up over the meaning of "the return > value" of an expression. I

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Adam Bark
On 5 July 2010 13:21, Adam Bark wrote: > On 5 July 2010 12:53, Richard D. Moores wrote: > >> On Mon, Jul 5, 2010 at 04:09, Stefan Behnel wrote: >> > Richard D. Moores, 05.07.2010 11:37: >> >> >> >> I keep getting hung up over the meaning of "the return >> >> value" of an expression. I am of cou

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Adam Bark
On 5 July 2010 12:53, Richard D. Moores wrote: > On Mon, Jul 5, 2010 at 04:09, Stefan Behnel wrote: > > Richard D. Moores, 05.07.2010 11:37: > >> > >> I keep getting hung up over the meaning of "the return > >> value" of an expression. I am of course familiar with values returned > >> by a funct

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Richard D. Moores
On Mon, Jul 5, 2010 at 04:54, Walter Prins wrote: > > > On 5 July 2010 08:27, Richard D. Moores wrote: >> >> See >> . >> I am quite familiar with the meaning of "x and y" in Python, and how >> it is evaluated -- firs

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Walter Prins
On 5 July 2010 08:27, Richard D. Moores wrote: > See < > http://docs.python.org/py3k/library/stdtypes.html#boolean-operations-and-or-not > >. > I am quite familiar with the meaning of "x and y" in Python, and how > it is evaluated -- first x, and only if x is False, then evaluate y. > Sorry if t

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Richard D. Moores
On Mon, Jul 5, 2010 at 04:09, Stefan Behnel wrote: > Richard D. Moores, 05.07.2010 11:37: >> >> I keep getting hung up over the meaning of "the return >> value" of an expression. I am of course familiar with values returned >> by a function, but don't quite grasp what the return value of, say, >>

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Stefan Behnel
Richard D. Moores, 05.07.2010 11:37: I keep getting hung up over the meaning of "the return value" of an expression. I am of course familiar with values returned by a function, but don't quite grasp what the return value of, say, the y of "x and y" might mean. Think of a different expression, l

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Richard D. Moores
On Mon, Jul 5, 2010 at 00:55, Steve Willoughby wrote: > On 05-Jul-10 00:27, Richard D. Moores wrote: >> >> >> See. >> I am quite familiar with the meaning of "x and y" in Python, and how >> it is evaluated -- first x,

Re: [Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Steve Willoughby
On 05-Jul-10 00:27, Richard D. Moores wrote: See. I am quite familiar with the meaning of "x and y" in Python, and how it is evaluated -- first x, and only if x is False, then evaluate y. But I just can't read "if x

[Tutor] "x and y" means "if x is false, then x, else y"??

2010-07-05 Thread Richard D. Moores
See . I am quite familiar with the meaning of "x and y" in Python, and how it is evaluated -- first x, and only if x is False, then evaluate y. But I just can't read "if x is false, then x, else y" that way. In fact,

Re: [Tutor] x and y

2008-03-22 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote >I just need a way to key a list of tuples of 2 for referencing. > >> I have no idea what you mean by that, can you give a more >> specific example? OK, I have now read your discussion with Kent. Can i ask, have you tried going through any of the basic tu

Re: [Tutor] x and y

2008-03-22 Thread elis aeris
I just need a way to key a list of tuples of 2 for referencing. On Sat, Mar 22, 2008 at 3:48 PM, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "elis aeris" <[EMAIL PROTECTED]> wrote > > > on a different note, also on lists, I need to save two values, x > > and y. > > > > list = { int, int > >

Re: [Tutor] x and y

2008-03-22 Thread Alan Gauld
"elis aeris" <[EMAIL PROTECTED]> wrote > on a different note, also on lists, I need to save two values, x > and y. > > list = { int, int > int, int > int, int > > but i am not sure of the syntax, is it possible to just read both > values > from the same entry in the list ?

[Tutor] x and y

2008-03-22 Thread elis aeris
on a different note, also on lists, I need to save two values, x and y. list = { int, int int, int int, int but i am not sure of the syntax, is it possible to just read both values from the same entry in the list ? ___ Tutor m