On PEP 312: simple implicit lambda

Christos TZOTZIOY Georgiou DLNXPEGFQVEB at spammotel.com
Wed Feb 19 02:00:21 EST 2003


On Wed, 19 Feb 2003 03:36:00 GMT, rumours say that "Stuart D. Gathman"
<stuart at bmsi.com> might have written:

>On Sun, 16 Feb 2003 09:47:11 -0500, Christos TZOTZIOY Georgiou wrote:
>
>
>> What I would do in such a case, would be the following:
>> 
>> <read_more_data>:
>>     data = file_object.read(4096)
>> while data:
>> 	# process here
>>     <read_more_data>
 
>I did a much cleaner syntax of this idea for an assembler preprocessor.
>Here is what it would look like in Python:
>
>  while when:
>    data = file_object.read(4096)
>  then data:
>    # process here
>
>The idea is that WHEN introduces arbitrary code which "sets up" for
>testing a condition, and THEN gets back to testing the condition.

<snip>

>Flame away!  I've always liked it because it allows any sequence of statements, 
>including nested loops and conditionals, to setup conditions in loops and
>short-circuit boolean expressions.

I see no need to flame; after all, this is kind of brainstorming (or
idle talk :) on a newsgroup; your syntax is a nice idea for
loops-and-a-half.
-- 
TZOTZIOY, I speak England very best,
Real email address: 'dHpvdEBzaWwtdGVjLmdy\n'.decode('base64')




More information about the Python-list mailing list