Hello,

I was looking at the possibility of replacing the SEEK_* constants by
IntEnums, and the first thing that catches attention is that these
constants are defined in both Lib/os.py and Lib/io.py; both places also
recently started supporting SEEK_HOLE and SEEK_DATA (though here io refers
to os.SEEK_HOLE and os.SEEK_DATA).

Additional data points: other modules take these constants as arguments -
* mmap: directs to use os.SEEK_*
* chunk and fcntk: spell out the numeric values.

os seems to import io in some functions; can this be done always? If yes,
we can just define the constants once and os.SEEK_* will alias io.SEEK_*?
The other way (io taking from os) is also a possibility (maybe the
preferred one because io already refers to os.SEEK_HOLE/DATA, at least in
the documentation).

Any ideas and suggestions are welcome,

Eli
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to