python-lorem
python-lorem copied to clipboard
Fix argument delegation of convenience functions.
I was hoping to use the convenience functions with the same parameters as is possible when directly instantiating TextLorem()
objects, but I was surprised this doesn't work.
i.e. this doesn't work:
import lorem
lorem.text(trange=(2, 2))
whereas this does:
from lorem.text import TextLorem
TextLorem(trange=(2, 2)).text()
However, this looks like a mistake rather than intention, as the delegation of the parameters is already present in __init__.py
, only the parameters are handed over to the methods of the TextLorem
class, which don't take arguments.
My changes make the former work as well, which is more convenient and very slightly easier to read for one-time usage.