This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tonylownds
Recipients
Date 2007-01-04.07:12:15
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
For getargs and getargvalues, including the names in positional args is an excellent strategy.
There are uses (in cgitb) in the stdlib for getargvalues that then wouldn't need to be changed. 

The 2 uses of getargspec in the stdlib (one of which I missed, in DocXMLRPCServer) are both 
closely followed by formatargspec. I think those APIs should change or information will be lost. 

Alternatively, a new function (hopefully with a better name than getfullargspec :) could be 
made and getargspec could retain its API, but raise an error when keyword-only arguments are 
present.

def getargspec(func):
  args, varargs, kwonlyargs, kwdefaults, varkw, defaults, ann = getfullargspec()
  if kwonlyargs:
     raise ValueError, "function has keyword-only arguments, use getfullargspec!"
  return args, varargs, varkw, defaults

I'll update the patch to fix getargvalues and DocXMLRPCServer this weekend.
History
Date User Action Args
2007-08-23 15:55:34adminlinkissue1607548 messages
2007-08-23 15:55:34admincreate