Ulrich Eckhardt wrote:
so why not:
while as :
...
and also:
if as :
...
This sort of thing has been suggested repeatedly in the
past, and it's always been rejected. That's not likely to
change. Look up the past threads for the reasons why.
--
Greg
--
http://mail.python.or
Peter Otten wrote:
> Duncan Booth wrote:
>> for rq in incoming_requests(...):
>>handle_request(rq)
>
> ...and a likely implementation would be
>
> def incoming_requests(...):
> while True:
> rq = ... # inlined version of get_request()
> if not rq:
> break
>
Duncan Booth wrote:
> Peter Otten <__pete...@web.de> wrote:
>
>> Ulrich Eckhardt wrote:
>>
>>> I'm looking for a way to write code similar to this C code:
>>>
>>> while(rq = get_request(..)) {
>>> handle_request(rq);
>>> }
>>>
>> Assuming get_request(...) is called with the same argum
Peter Otten <__pete...@web.de> wrote:
> Ulrich Eckhardt wrote:
>
>> I'm looking for a way to write code similar to this C code:
>>
>> while(rq = get_request(..)) {
>> handle_request(rq);
>> }
>>
> Assuming get_request(...) is called with the same arguments on each
> iteration and uses
Ulrich Eckhardt wrote:
> I'm looking for a way to write code similar to this C code:
>
> while(rq = get_request(..)) {
> handle_request(rq);
> }
>
> Currently I'm doing
>
> while True:
> rq = get_request(...)
> if not rq:
> break
> handle_request(rq)
>
>
Ulrich Eckhardt wrote:
> Hi!
>
> I'm looking for a way to write code similar to this C code:
>
> while(rq = get_request(..)) {
> handle_request(rq);
> }
>
> Currently I'm doing
>
> while True:
> rq = get_request(...)
> if not rq:
> break
> handle_request(rq)
Hi!
I'm looking for a way to write code similar to this C code:
while(rq = get_request(..)) {
handle_request(rq);
}
Currently I'm doing
while True:
rq = get_request(...)
if not rq:
break
handle_request(rq)
in Python 2.6. Any suggestions how to rewrite tha