Specify start and length, beside start and end, in slices

Fredrik Lundh fredrik at pythonware.com
Mon May 24 13:54:52 EDT 2004


Noam Raphael wrote:

> I have to write:
> picture[s2i(picture[10:14]):s2i(picture[10:14])+4]
> I think this is nicer (and quicker):
> picture[s2i(picture[10:>4]):>4]

that's spelled

    picture = Image.open(file)
    picture.getpixel((0, 0))

</F>







More information about the Python-list mailing list