python: better way to extend existing classes
* wrap/python/spot.py: Use a decorator to extend classes. * wrap/python/tests/formulas.ipynb: Adjust expected help text.
This commit is contained in:
parent
1f0258e9f7
commit
e8ce08a989
2 changed files with 173 additions and 174 deletions
|
|
@ -243,9 +243,9 @@
|
|||
"output_type": "stream",
|
||||
"stream": "stdout",
|
||||
"text": [
|
||||
"Help on function _formula_format in module spot:\n",
|
||||
"Help on function __format__ in module spot:\n",
|
||||
"\n",
|
||||
"_formula_format(self, spec)\n",
|
||||
"__format__(self, spec)\n",
|
||||
" Format the formula according to `spec`.\n",
|
||||
" \n",
|
||||
" Parameters\n",
|
||||
|
|
@ -724,4 +724,4 @@
|
|||
"metadata": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue