[issue4761] create Python wrappers for openat() and others

Antoine Pitrou report at bugs.python.org
Tue Dec 21 19:28:46 CET 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

Thanks for the patch. A couple of comments:
- the C code is misindented in some places (using 8 spaces rather than 4)
- you should use support.unlink consistently in the tests (rather than sometimes os.unlink or posix.unlink)
- when cleaning up in tests (through unlink() or rmdir()), it's better to use finally clauses so that cleaning up gets done even on error; or, alternatively, to use self.addCleanup() (see http://docs.python.org/dev/library/unittest.html#unittest.TestCase.addCleanup)

(I haven't looked at the C code in detail since you say it's mostly copy/paste from existing code)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4761>
_______________________________________


More information about the Python-bugs-list mailing list