[Python-3000] iostack, second revision

Antoine Pitrou solipsis at pitrou.net
Fri Sep 8 09:02:48 CEST 2006

Le jeudi 07 septembre 2006 à 16:33 -0700, Guido van Rossum a écrit :
> Why not use tell() and seek() instead of get_pointer() and
> set_pointer()? Seek should also support several special cases:
> f.seek(0) seeks to the start of the file no matter what type is
> otherwise used for pointers ("seek cookies" ?), f.seek(0, 1) is a
> no-op, f.seek(0, 2) seeks to EOF.

Perhaps it would be good to drop those magic numbers (0, 1, 2) for
seek() ? They don't really help readibility except perhaps for people
who still do a lot of C ;)



More information about the Python-3000 mailing list