<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 06/07/2012 07:08 PM, Steven D'Aprano wrote:
<blockquote cite="mid:4FD15E89.2090801@pearwood.info" type="cite">Perhaps
func.__signature__ should be a computed the first time it is
accessed?</blockquote>
<br>
The PEP already declares that signatures are lazily generated.
signature() checks to see if __signature__ is set, and if it is
returns it. (Or, rather, a deepcopy of it, assuming we go down that
route.) If __signature__ isn't set, signature() computes it and
returns that. (Possibly caching in __signature__, possibly not,
possibly caching the result then returning a deepcopy.)<br>
<br>
<br>
<i>/arry</i><br>
</body>
</html>