[Python-Dev] PEP 362 Third Revision

Larry Hastings larry at hastings.org
Fri Jun 15 20:17:09 CEST 2012


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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20120615/fd44e194/attachment-0001.html>


More information about the Python-Dev mailing list