[Python-3000] iostack, second revision
Ronald Oussoren
ronaldoussoren at mac.com
Fri Sep 8 15:37:00 CEST 2006
On Friday, September 08, 2006, at 02:30PM, Jean-Paul Calderone <exarkun at divmod.com> wrote:
>On Fri, 8 Sep 2006 00:26:55 -0700, Hasan Diwan <hasan.diwan at gmail.com> wrote:
>>On 08/09/06, Antoine Pitrou <solipsis at pitrou.net> wrote:
>>>
>>>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 ;)
>>
>>+1
>>If we can't don't want to eliminate the "magic numbers" entirely, perhaps we
>>could assign symbolic constants to them? fileobj.seek(fileobj.START) for
>>instance?
>
>Note that Python is _worse_ than C here. C has named constants for these,
>Python does not expose them.
What about os.SEEK_SET, os.SEEK_CUR, os.SEEK_END? The named constants are there, just not at the most convenient location.
Ronald
>
>Jean-Paul
>_______________________________________________
>Python-3000 mailing list
>Python-3000 at python.org
>http://mail.python.org/mailman/listinfo/python-3000
>Unsubscribe: http://mail.python.org/mailman/options/python-3000/ronaldoussoren%40mac.com
>
>
More information about the Python-3000
mailing list