On 06/15/2012 04:32 AM, Nick Coghlan wrote:
Since I don't believe your proposed flag will answer any question that actually matters in practice, I consider it useless noise that should be dropped from the proposal.
I can cite a situation where it matters in practice: the implementation of os.fwalk is effectively gated on hasattr(posix, "openat"). I expect to remove openat() in favor of adding a dir_fd parameter to open (see issue 14626).
Now, what a function *could* do is set __signature__ to a Signature subclass that provided an additional "validate()" method, or provided arbitrary additional information about supported features. That's a perfectly reasonable option.
What would the validate() function for os.close do? //arry/
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com