Plugin registration

Reading the code, there are two ways to register plugins (files *.gpr.py):

  • “verbose”
plg = newplugin()
plg.<property> = <value>
…
  • “concise”
register(<property>=<value>, …)

Function register internally calls newplugin and does the conversion between both forms.

About half plugins use the “verbose” declaration and the other half the “concise” declaration. The “concise” one is labelled a convenience function in a comment.

Which one is recommended for preferential use?
What is the advantage of one over the other as they are strictly equivalent in their effect?

There was some discussion of making registration more flexible… the possibility of allowing an add-on with a higher version to supersede an outdated built-in.

And expanding to support registration of a few properties universally across plugin types (like the help-url) to expand plugin manager UI &UX options.

Probably irrelevant to this specific question. But it might also change the baseline for concise and verbose.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.