A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2009-January/084899.html below:

[Python-Dev] error in doc for fcntl module

[Python-Dev] error in doc for fcntl moduleMike Coleman tutufan at gmail.com
Wed Jan 7 22:31:33 CET 2009
In the doc page for the fcntl module, the example below is given.
This seems like an error, or at least very misleading, as the normal
usage is to get the flags (F_GETFL), set or unset the bits you want to
change, then set the flags (F_SETFL).  A reader might think that the
example below merely sets O_NDELAY, but it also stomps all of the
other bits to zero.

If someone can confirm my thinking, this ought to be changed.

import struct, fcntl, os

f = open(...)
rv = fcntl.fcntl(f, fcntl.F_SETFL, os.O_NDELAY)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4