This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients christian.heimes, loewis, pitrou
Date 2008-12-28.21:17:29
SpamBayes Score 9.026583e-06
Marked as misclassified No
Message-id <4957ECE6.9010106@v.loewis.de>
In-reply-to <1230497681.12.0.372405794228.issue4761@psf.upfronthosting.co.za>
Content
> Developers may think that the file descriptor is closed when the integer
> object gets out of scope.

I'm not concerned about that. When they use os.open, they will typically
understand what a file handle is, and how it relates to

> I propose the addition of opendir() for the purpose of the *at()
> functions. The opendir function should return a wrapper object around
> the DIR* pointer returned by opendir(). A function fileno() exposed the
> file descriptor of the DIR pointer via dirfd().

-1. This is exactly the second-guessing kind of thing that the POSIX
module should avoid. openat(2) doesn't expect DIR objects, and neither
should posix.openat.

If desired, a layer can be added on top of this that makes it more
"safe", e.g. in the os module; such a layer should then try to make it
cross-platform before trying to make it safe.
History
Date User Action Args
2008-12-28 21:17:30loewissetrecipients: + loewis, pitrou, christian.heimes
2008-12-28 21:17:29loewislinkissue4761 messages
2008-12-28 21:17:29loewiscreate