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). nit if expects an expression that can be converted

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 lie.1...@gmail.com 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

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). nit if expects an expression

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

2010-07-05 Thread Richard D. Moores
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. But I just can't read if x is false, then x, else y that way. In fact, I

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: Seehttp://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. But I just can't read if x is

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 st...@alchemy.com wrote: On 05-Jul-10 00:27, Richard D. Moores wrote: Seehttp://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

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, like

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 stefan...@behnel.de 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,

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 rdmoo...@gmail.com 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.

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 wpr...@gmail.com wrote: On 5 July 2010 08:27, Richard D. Moores rdmoo...@gmail.com 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

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 rdmoo...@gmail.com wrote: On Mon, Jul 5, 2010 at 04:09, Stefan Behnel stefan...@behnel.de 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

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 adam.jt...@gmail.com wrote: On 5 July 2010 12:53, Richard D. Moores rdmoo...@gmail.com wrote: On Mon, Jul 5, 2010 at 04:09, Stefan Behnel stefan...@behnel.de wrote: Richard D. Moores, 05.07.2010 11:37: I keep getting hung up over the meaning of the return

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 st...@alchemy.com 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

[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

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 ? I have no

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 int, int

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 tutorials?