On 9/8/06, Antoine Pitrou <[EMAIL PROTECTED]> wrote:
> 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 ;)

Maybe (since I fall in that category it doesn't bother me :-), but we
shouldn't replace them with symbolic constants. Having to import
another module to import names like SEEK_CUR and SEEK_END is not
Pythonic. Perhaps the seek() method can grow keyword arguments to
indicate the different types of seekage, or there should be three
separate methods.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to