[Python-Dev] Use function names instead of functions for os.supports_dir_fd?
Larry Hastings
larry at hastings.org
Wed Jul 18 01:13:33 CEST 2012
More information about the Python-Dev mailing list
Wed Jul 18 01:13:33 CEST 2012
- Previous message: [Python-Dev] Use function names instead of functions for os.supports_dir_fd?
- Next message: [Python-Dev] Use function names instead of functions for os.supports_dir_fd?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07/17/2012 10:34 AM, Victor Stinner wrote: > Python 3.3 introduced os.supports_dir_fd to check if some os functions > do accept a file descriptor instead of a path. The problem is that > os.supports_dir_fd is a list of functions, not a list of function > names. If os functions are monkey patched, you cannot test anymore if > a function supports file descriptor. If you're monkey-patching the function, you can monkey-patch os.supports_dir_fd too. > Monkey patching is a common practice in Python. test_os.py replaces > os.exec*() functions temporary for example. For testing, yes. It's not recommended for production code. //arry/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120717/f9d63070/attachment.html>
- Previous message: [Python-Dev] Use function names instead of functions for os.supports_dir_fd?
- Next message: [Python-Dev] Use function names instead of functions for os.supports_dir_fd?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list