After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690681 - Python: failure to state correct argument name
Python: failure to state correct argument name
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-12-23 21:03 UTC by Andreas J. Guelzow
Modified: 2012-12-26 23:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first patch attempt (9.05 KB, patch)
2012-12-25 22:37 UTC, Andreas J. Guelzow
none Details | Review

Description Andreas J. Guelzow 2012-12-23 21:03:13 UTC
new gnumeric
in A1 type:
=py_capwords(

the tooltip now shows py_capwords(>...<)
this seems to indicate multiple arguments, If you type a comma next you see that it correctly knows that it should have a single argument. On teh other hand the name '...' is incorrect. It should be 'sentence':

	# 'func_capwords' provides the spreadsheet function 'py_capwords'.
	# 'py_capwords' should be called with a single argument.
	# This should be a string ('s'), and the argument name is 'sentence'.
	'py_capwords': ('s', 'sentence', func_capwords),
Comment 1 Andreas J. Guelzow 2012-12-25 22:37:47 UTC
Created attachment 232222 [details] [review]
first patch attempt

The attached patch:
1) introduces the new-style documentation formats to the python functions
2) extracts the argument names also for old-style formatting

Problems: 

1) The patch is leaking the help text strings. (Since this only happens when the function is unloaded, this occurs normally only on termination.)
2) There is no option to mark the strings for translation at this time.
Comment 2 Andreas J. Guelzow 2012-12-26 23:17:24 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.