Mailing List Archive

Why no "=" in if? (was Re: Quick fix to add "+=")
I'm getting really sick of the way I have to use this stupid construct:

x = foo()
if x:
...

instead of

if x = foo():
...

Why doesn't Guido get off his duff and fix this?????????!





In article <000701be888f$12fe2920$ee9e2299@tim>,
Tim Peters <tim_one@email.msn.com> wrote:
>
>can't-wait-for-a-resumption-of-the-assignment-expression-thread<wink>-ly
>y'rs - tim

Be careful what you ask for. You may get it.
--
--- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het

Sometimes, you're not just out of left field, you're coming in
all the way from outer space.
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
In article <aahzFAC5up.5op@netcom.com>, aahz@netcom.com (Aahz Maruch) wrote:

> I'm getting really sick of the way I have to use this stupid construct:
>
> x = foo()
> if x:
> ...
>
> instead of
>
> if x = foo():
> ...
>
> Why doesn't Guido get off his duff and fix this?????????!

Because it's not broken.

--John

--
If nothing is pressing, putter about with this or that.
(Fortune cookie)
John W. Baxter Port Ludlow, WA USA jwb@olympus.net
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
In article <jwbaxter-1704990718500001@otter.olympus.net>,
John W. Baxter <jwbaxter@olympus.net> wrote:
>In article <aahzFAC5up.5op@netcom.com>, aahz@netcom.com (Aahz Maruch) wrote:
>>
>> Why doesn't Guido get off his duff and fix this?????????!
>
>Because it's not broken.

Yes, it is.
--
--- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het

Sometimes, you're not just out of left field, you're coming in
all the way from outer space.
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
* Aahz Maruch
|
| x = foo()
| if x:
| ...
|
| instead of
|
| if x = foo():
| ...
|
| Why doesn't Guido get off his duff and fix this?????????!

What's so wrong about it? Personally I seriously dislike assignments
that return values (at least in conventional languages).

--Lars M.
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
> can't-wait-for-a-resumption-of-the-assignment-expression-thread<wink>-ly
> y'rs - tim

[Aahz Maruch]
> I'm getting really sick of the way I have to use this stupid construct:
>
> x = foo()
> if x:
> ...
>
> instead of
>
> if x = foo():
> ...
>
> Why doesn't Guido get off his duff and fix this?????????!

[John Baxter]
> Because it's not broken.

[Aahz]
> Yes, it is.

Excellent! We've now summarized in just 3 brief messages just about
everything that was said over the course of (literally) hundreds of msgs the
last time this came up <0.1 wink>.

If anyone wants to continue this now, consider just posting a link to the
DejaNews article you would have otherwise rewritten.

can't-wait-for-the-resumption-of-the-indexing-thread<wink>-ly y'rs - tim
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
aahz@netcom.com (Aahz Maruch) writes:

> I'm getting really sick of the way I have to use this stupid construct:
>
> x = foo()
> if x:
> ...
>
> instead of
>
> if x = foo():
> ...
>
> Why doesn't Guido get off his duff and fix this?????????!

I'm really sick of the way I get to use this stupid construct:

if x == foo():

I think we should go back to the days of condition codes:

compare(x, foo())
ife:

--
-russ nelson <rn-sig@crynwr.com> http://crynwr.com/~nelson
Crynwr supports Open Source(tm) Software| PGPok | There is good evidence
521 Pleasant Valley Rd. | +1 315 268 1925 voice | that freedom is the
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | cause of world peace.
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
On Sat, 17 Apr 1999 14:30:04 GMT, Aahz Maruch <aahz@netcom.com> wrote:
>In article <jwbaxter-1704990718500001@otter.olympus.net>,
>John W. Baxter <jwbaxter@olympus.net> wrote:
>>In article <aahzFAC5up.5op@netcom.com>, aahz@netcom.com (Aahz Maruch) wrote:
>>>
>>> Why doesn't Guido get off his duff and fix this?????????!
>>
>>Because it's not broken.
>
>Yes, it is.

Hitler! Hitler! Hitler!
You're all Hitler!

Later,
Blake.
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
Blake Winton wrote:

[assignment in expression rears its head again]

> Hitler! Hitler! Hitler!
> You're all Hitler!

Hey, that doesn't work; intentional calling upon Nazis to end a thread
isn't support to work. I read it in a FAQ on this (I forget the name for
the 'law') just recently. :)

Regards,

Martijn
Why no "=" in if? (was Re: Quick fix to add "+=") [ In reply to ]
In article <371B2C29.594AE647@pop.vet.uu.nl>,
Martijn Faassen <M.Faassen@vet.uu.nl> wrote:
>Blake Winton wrote:
>
>[assignment in expression rears its head again]
>
>> Hitler! Hitler! Hitler!
>> You're all Hitler!
>
>Hey, that doesn't work; intentional calling upon Nazis to end a thread
>isn't support to work. I read it in a FAQ on this (I forget the name for
>the 'law') just recently. :)

Godwin's Law.
--
--- Aahz (@netcom.com)

Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het

"You often don't really understand the problem until after the first
time you implement a solution." - Eric S. Raymond