Pre-PEP: reverse iteration methods

Bob Gailer bgailer at alum.rpi.edu
Wed Sep 24 13:12:34 EDT 2003


At 06:30 PM 9/23/2003, you wrote:

>Here is a discussion draft of a potential PEP.
>The ideas grew out of the discussion on pep-284.
>Comments are invited.  Dart throwing is optional.
>
>The discussion so far has focused on how to modify the operand of for x in.
>
>There is another viewpoint: consider that we are modifying the behavior of 
>for x in
>
>In APL we often modify the behavior of a primitive operator by adding 
>something to the operator itself. For example
>+/A means apply + along the last last dimension of the array A. (e.g. sum 
>the elements in each row of the matrix A)
>To sum along the columns change the expression to =+/[1]A where the index 
>modifies the / operator.
>
>Could this open the door to some fundamentally new Python syntax that 
>would support the modification of keyword behavior? e.g.:
>
>for x in[-1] list:
>for[-1] x in list:
>for x in[-1] list:for x in[-1] list:
>for.reverse x in list:
>for x out list:
>rof x in list:
>
>Let's brainstorm?

Bob Gailer
bgailer at alum.rpi.edu
303 442 2625
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.506 / Virus Database: 303 - Release Date: 8/1/2003


More information about the Python-list mailing list