launchpadlib methods do not support positional parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Triaged
|
Low
|
Unassigned |
Bug Description
When invoking methods on a launchpadlib Launchpad object positional arguments are not accepted. So if you try the following you get an exception:
>>> lp.people.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __call__() takes exactly 1 argument (2 given)
In order to make the method call you must name all parameters:
>>> lp.people.
<launchpadlib.
If launchpadlib cannot be made to accept positional arguments it should be documented. Looking at the help file (https:/
Related branches
- Paul Hummer (community): Approve
Changed in launchpadlib: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in launchpadlib: | |
importance: | Medium → Low |
tags: | added: ui |
We looked into this a while back. It's not really possible to make this work in the general case because the rules for exporting arguments through the web service are different from the rules for writing a Python method. It's possible to make this work in the degenerate case where an operation has only one argument, but it's still enough client-side programming that I didn't pick it up.
In the meantime, I've updated the launchpadlib documentation.