Showing content from http://mail.python.org/pipermail/python-dev/attachments/20120606/d0cc42d0/attachment.html below:
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<br>
Sorry I missed answering these on my first pass.<br>
<br>
On 06/06/2012 08:38 AM, Steven D'Aprano wrote:<br>
<blockquote cite="mid:4FCF7965.5070102@pearwood.info" type="cite">What
to do about parameters which are partly implemented? E.g.
mode='spam' is implemented but mode='ham' is not.</blockquote>
<br>
Parameter objects aren't sophisticated enough to represent such a
situation. If you have a use case for a more sophisticated
approach, and can propose a change to the Parameter object to handle
it, I'd be interested to see it.<br>
<br>
In truth, the way I currently support those "unimplemented"
parameters is, passing in the default parameter is still permitted.
So in a way I suppose I already have this situation, kinda? But
is_implemented as it stands works fine for my use case.<br>
<br>
<blockquote cite="mid:4FCF7965.5070102@pearwood.info" type="cite">inspect.getfullargspec
is currently unable to introspect builtin functions and methods.
Should builtins gain a __signature__ so they can be introspected?</blockquote>
<br>
If function signatures are useful, then they're useful, and the
implementation language for the function is irrelevant. I already
sent Yuri a patch adding __signature__ to PyCFunctionObject, which I
thought he merged but I don't see in his repo.<br>
<br>
The problem (obviously) is generating the signature. Brett has an
idea about parsing the docstring; it strikes me as hackish. I think
solving the problem definitively will require a new argument parsing
API and that's simply not happening for 3.3.<br>
<br>
If my patch for issue 14626 and PEP 362 both land in 3.3, my plan is
to hard-code the signatures for just those functions.<br>
<br>
<br>
<i>/arry</i><br>
</body>
</html>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4