Quote:
Originally Posted by chaley
Code:
python:
def evaluate(**arguments):
book = arguments['book']
db = arguments['db']
|
It's... a bit strange and unusual, but not bad and interesting (just something to learn)
But maybe it would still be great to put an *args.
We have **arguments (which we rename **data) which contains the basic data related to this book, or anything else we want to provide turnkey to the users.
And on the other side we have *args, which allows to pass arguments to the function during its use, to give it a little more versatility and less "single use". For *args, it's up to the user to program the analysis and the use of the arguments he passed to the function.
Code:
python_template('authors', 'title', 'tags')
python_template('#original_title', '#translator')
Same code, but different output because different input. And if there is a problem, it's because he mismanaged his *args.
Maybe.
Quote:
Originally Posted by chaley
Adding on to the above suggestion about **arguments, how about adding a line to the context menu of the template editor that inserts
This is both a shortcut for typing and aids discoverability.
|
Yep. That would be great.