API details.

param_locs[source]

param_locs(s)

dict of parameter line numbers to names

The location of the closing parenthesis for the parameter list is in the return key.

def adder(
    a:int, # The 1st number to add
    # The 2nd number to add.
    #   NB: This is added to `a`
    b:int,
)->int:    # The result of adding `a` to `b`
    "Add `a` to `b`"
    # Calculate the addition
    return a+b

parms = param_locs(adder)
parms
{6: 'return', 2: 'a', 5: 'b'}

docments[source]

docments(s)

dict of parameter names to 'docment-style' comments in function or string s

docments(adder)
{'return': 'The result of adding `a` to `b`',
 'a': 'The 1st number to add',
 'b': 'The 2nd number to add.\n  NB: This is added to `a`'}
from nbdev.export import notebook2script
notebook2script()
Converted 00_core.ipynb.
Converted index.ipynb.