Marko Rauhamaa <[email protected]>:
> If I take the API documentation on its face value, [...]
> I *must* use "is" for os.POSIX_FAVD_*:
>
> if fsavd_flag is os.POSIX_FADV_RANDOM:
> ...
However, since a documentation flaw is more than likely, it is even more
prudent to avoid both "==" and "is" and create a set of shadow constants
in the application code:
if self.fsavd_flag is self.FAVD_RANDOM:
os.posix_fadvice(fd, offset, len, os.POSIX_FAVD_RANDOM):
Marko
--
https://mail.python.org/mailman/listinfo/python-list