On Sun, Jan 17, 2016 at 9:47 AM, Alister wrote:
> On 16/01/16 21:53, Steven D'Aprano wrote:
>>
>> On Sun, 17 Jan 2016 01:06 am, Alister wrote:
>>
>>> Conditional operators (or and not == etc.) need to be used in a test
>>
>>
>> Technically, that is incorrect.
>
> yes but the op is confused in his
On Sat, Jan 16, 2016 at 8:47 PM, Alister wrote:
>>
>> default = "I like Brussels sprouts."
>> message = random.choice(["", "I like boiled cabbage."])
>> print( message or default )
>>
>>
>>
> I hope I never see production code like that
>
I agree. If you are going to use spaces after '(' and befo
On 16/01/16 21:53, Steven D'Aprano wrote:
On Sun, 17 Jan 2016 01:06 am, Alister wrote:
Conditional operators (or and not == etc.) need to be used in a test
Technically, that is incorrect.
yes but the op is confused in his usage enough at present
how else would you expect you print stateme
On Sun, 17 Jan 2016 01:06 am, Alister wrote:
> Conditional operators (or and not == etc.) need to be used in a test
Technically, that is incorrect.
> how else would you expect you print statement to be able to decided
> which to print?
default = "I like Brussels sprouts."
message = random.cho
On 15/01/16 20:24, Kitten Corner wrote:
Hi, I have python version 3.5.1 and I am working on a project, I'm trying
to make it by using the 'or' sequence, I'm trying to make it do 1 thing or
the other, here's an example: print('i like pie' or 'i like donuts'), it
only does the thing that's before t
Christian Gollwitzer :
> Am 15.01.16 um 21:24 schrieb Kitten Corner:
>> print('i like pie' or 'i like donuts')
>
>> it only does the thing that's before the 'or', please help!
>
> I think you misunderstand what "or" does. It evaluates the first
> expression, and if this is false, it evaluates the
On Sat, Jan 16, 2016 at 7:24 AM, Kitten Corner
wrote:
> Hi, I have python version 3.5.1 and I am working on a project, I'm trying
> to make it by using the 'or' sequence, I'm trying to make it do 1 thing
> or the other, here's an example: print('i like pie' or 'i like donuts'),
> it only does the
Am 15.01.16 um 21:24 schrieb Kitten Corner:
Hi, I have python version 3.5.1 and I am working on a project, I'm trying
to make it by using the 'or' sequence, I'm trying to make it do 1 thing or
the other, here's an example:
print('i like pie' or 'i like donuts')
it only does the thing that's
On Sat, Jan 16, 2016 at 7:24 AM, Kitten Corner wrote:
> Hi, I have python version 3.5.1 and I am working on a project, I'm trying
> to make it by using the 'or' sequence, I'm trying to make it do 1 thing or
> the other, here's an example: print('i like pie' or 'i like donuts'), it
> only does the
Hi, I have python version 3.5.1 and I am working on a project, I'm trying
to make it by using the 'or' sequence, I'm trying to make it do 1 thing or
the other, here's an example: print('i like pie' or 'i like donuts'), it
only does the thing that's before the 'or', please help!
From,
Kitten Corner
10 matches
Mail list logo