Is there a way to make docstring follow the order that params are specified?

import param

class Test1(param.Parameterized):
    b = param.Dict(default=None, allow_None=False)
    a = param.Dict(default=None, allow_None=False)

I want b listed first, but a is listed first:

Init signature: Test1(**params)
params(a=Dict, b=Dict, name=String)
Parameters of 'Test1'

Parameters changed from their default values are marked in red.
Soft bound values are marked in cyan.
C/V= Constant/Variable, RO/RW = ReadOnly/ReadWrite, AN=Allow None

NameValue  Type    Mode  

a   None  Dict  V RW AN 
b   None  Dict  V RW AN 

Did you try to set the precedence on each of your parameter?
This drives the output layer but my thought is that’s what you want.

Doesn’t seem to have an effect on docstrings.

Good question! Param was written for Python2, where the parameter order wasn’t preserved usefully, so we sorted them in various places. For Panel we now respect the definition order, and I think the Param docstring should do that now as well. I’m not sure whether this should be configurable or simply stop sorting altogether. My guess is that we don’t need a configuration option to control it, as we’ve never defined what the docstring behavior is, but maybe someone will complain if we don’t allow the old behavior to be restored. In any case I think it’s as simple as removing "sorted()` in ParamPager.param_docstrings, though there may be some other sorting elsewhere. Indeed, probably most “.sort()” and “sorted()” calls should be removed everywhere in the Param source code, because most are probably destroying user-created ordering. I’d appreciate seeing an issue on Param proposing removing such sorting, and/or a PR removing it specifically for the docstrings.