Hi Lino,
On 7/1/07, Lino Mastrodomenico <[EMAIL PROTECTED]> wrote:
> ``__getitem__(integer) -> line``
>
> Returns the line at the specified (y) position.
Just some ideas to think about.
1) Have you considered adding a separate lines property to the Image protocol?
2) Does one, by default, want to iterate over lines or over pixels of
an image? Even your example iterates over pixels:
# iterate over an image
for line in rgb_image:
for pixel in line:
# swap red and blue, and set green to 0
pixel.value = pixel.b, 0, pixel.r
why not just:
# iterate over an image
for pixel in rgb_image:
pixel.value = pixel.b, 0, pixel.r
3) The pixels method (same for the possible lines property that I
mentioned above) should probably be a property, i.e.:
pixels -> iterator[pixel], not: pixels() -> iterator[pixel]
P.S.: You might also inform the SciPy/NumPy lists about the PEP.
Keep up the good work!,
Edin
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com