[issue17481] inspect.getfullargspec should use __signature__

Larry Hastings report at bugs.python.org
Sun Jan 19 11:44:43 CET 2014


Larry Hastings added the comment:

I just want to mention, while we're all thinking about this stuff: I plan to enhance the Signature object to reflect "optional groups".  Right now Signature objects cannot express parameters that are optional but don't have a published default.  (e.g. a string parameter for a builtin having a default of NULL).  A lot of these are being converted using optional groups, and I want to make it at least possible for user code to introspect those functions and understand that those are optional parameters.

My original plan was to add a "group" member, containing an arbitrary identifier of the "group" this parameter belongs to.  I'm not sure that's sufficient; I may also need a "parent_group" parameter, or something like that, to represent the group that this group is nested in.  I'm still thinking about it.  But I'm hoping to get to this in the next two or three days.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17481>
_______________________________________


More information about the Python-bugs-list mailing list