[Python-3000] iostack, second revision

Jean-Paul Calderone exarkun at divmod.com
Fri Sep 8 14:29:57 CEST 2006


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.

Jean-Paul


More information about the Python-3000 mailing list