New features
util.split()
This is a new function that splits a string _around_ a delimiter, rather than _at_ a delimiter as the python .split() attribute does.
util.multi_split()
An advanced version of the util.split() function. Splits the given string around every given item, and yields a list with the result. Splits around items in order of occurrence, thus, no items that have already been iterated through can be split again.
modules.NumAn
Due to the changes in mathpar.product_parser(), NumAn now supports implicit multiplication for defined constants in all cases now. E.g.:
![image](https://user-images.githubusercontent.com/87773847/195974748-6b02b023-e848-43a6-a7aa-3803cd1c913f.png)
Where the parser reads the expression as:
`'A/epsilon*l*_NA*A'` rather than `'A/epsilonl*_NA*A'` as previously.
.ans
This is a new attribute that yields the result from the previous computation when called.
.add_cns()
This function acts as an additional mean to add constants to the class, which may be used in computations. The special feature of this attribute, is that constants that have been defined previously (either in \_\_init\_\_() or in previous instances of add_cns()) may be used, when defining constants.
.add_res()
This function simply adds the previous result (obtained from .ans) to the constants 'table' to be used with the specified name.
.calc()
On the basis of add_res(), calc() now takes an additional optional argument `add_res`, which if given a name as type `str`, adds the result from the computation to the constants table.
Changes
mathpar.product_parser()
This function has been rewritten from the ground up, and is now much more precise. Based on util.multi_split().
Misc and bug-fixes
util.string_sorter()
Previously, if only a single list was given, this list was packed into another list. This has now been fixed.
modules.NumAn
Fixed an issue, where natural constants were read incorrectly, if they contained defined constants.
mathpar.parser()
Increased clarity of error handling messages.