"Steven D'Aprano" wrote
Spiced tea with milk. Well, technically, it just means "tea with
milk", but in English chai is used exclusively for spiced tea
Never heard of it I confess.
I've heard the, presumably related, term char, meaning a cup of black
tea (as in tea without milk, not black l
Alan Gauld wrote:
"Steven D'Aprano" wrote
ordered a chai latte at a cafe. The waiter had no idea what that was,
but must have known that "chai" means tea, and so mixed tea and coffee
So now I've got to ask, what is a chai latte?
I could Google it but I'm feeling lazy :-)
Spiced tea with m
"Steven D'Aprano" wrote
ordered a chai latte at a cafe. The waiter had no idea what that
was, but must have known that "chai" means tea, and so mixed tea and
coffee
So now I've got to ask, what is a chai latte?
I could Google it but I'm feeling lazy :-)
Alan G.
Lie Ryan wrote:
The question "Would you like Italian or Chinese for dinner" is actually
a contraction of "Would you like Italian for dinner or would you like
Chinese for dinner". If we ask these two questions separately to the
wife, we get either "Yes or Yes", "Yes or No", "No or Yes", or "No or
On 12/11/10 04:12, Alan Gauld wrote:
> "Steven D'Aprano" wrote
>> As an experiment, offer to buy your wife dinner, and ask if she'd
>> prefer to go to an Italian or Chinese restaurant.
>
> :-)
> She would either answer "Yes" (she would like to go to one of
> them, and if I'm lucky she might give
Hi Steven
On 10 December 2010 03:50, Steven D'Aprano wrote:
> Some languages (Pascal comes to mind) doesn't have short-circuit behaviour
> at all.
>
Don't mean to nit pick, but in my experience it really depends on the
compiler implementation and which version of Pascal you're talking about.
Ce
"Steven D'Aprano" wrote
Python knows that if val is true then it doesn't need to evaluate
the second term that causes it to return val rather than 1.
That's what makes it short circuiting, but that's not why it returns
the first argument. `or` in standard Pascal doesn't short-circuit.
But
ALAN GAULD wrote:
Doesn't short-circuit evaluation refer specifically to the behavior
where arguments are only evaluated if they need to be? It's a very
useful feature, but not technically required for the "val = val or 1"
behavior to work.
Its essential.
If Python always evaluated all par
> Doesn't short-circuit evaluation refer specifically to the behavior
> where arguments are only evaluated if they need to be? It's a very
> useful feature, but not technically required for the "val = val or 1"
> behavior to work.
Its essential.
If Python always evaluated all parts of a boole
Hugo Arts wrote:
Doesn't short-circuit evaluation refer specifically to the behavior
where arguments are only evaluated if they need to be? It's a very
useful feature, but not technically required for the "val = val or 1"
behavior to work.
Yes, exactly.
Some languages (Pascal comes to mind) d
On Fri, Dec 10, 2010 at 2:07 AM, Alan Gauld wrote:
>
> "Alex Hall" wrote
>>
>> val=val or 1
>
>> I am guessing that val is an int. If val==0, the 'or' kicks in and
>> val=1, else the or is not needed and val=val. Am I close?
>
> Yes this is a combination of what is known as short circuit evaluati
Thanks to all for the quick responses. Python always surprises me with
its shortcuts...
On 12/9/10, Alan Gauld wrote:
>
> "Alex Hall" wrote
>
>> val=val or 1
>
>> I am guessing that val is an int. If val==0, the 'or' kicks in and
>> val=1, else the or is not needed and val=val. Am I close?
>
> Y
"Alex Hall" wrote
val=val or 1
I am guessing that val is an int. If val==0, the 'or' kicks in and
val=1, else the or is not needed and val=val. Am I close?
Yes this is a combination of what is known as short circuit
evaluation of boolean expressions and a quirk of Python that
returns
On 10/12/10 00:51, Alex Hall wrote:
Hi all,
I am reading the source of a project I hope to help with
(http://www.qwitter-client.net). I sometimes see something like:
val=val or 1
I am guessing that val is an int. If val==0, the 'or' kicks in and
val=1, else the or is not needed and val=val. Am I
Hi all,
I am reading the source of a project I hope to help with
(http://www.qwitter-client.net). I sometimes see something like:
val=val or 1
I am guessing that val is an int. If val==0, the 'or' kicks in and
val=1, else the or is not needed and val=val. Am I close? Can other
words or symbols be u
15 matches
Mail list logo