vaibhavsingh97 / random-word

This is a simple python package to generate random english words
https://pypi.org/project/random-word/
MIT License
123 stars 25 forks source link

Support plain length parameter #22

Open ErikBoesen opened 5 years ago

ErikBoesen commented 5 years ago

Is your feature request related to a problem? Please describe. My project calls for generating words of length n, rather than a range. It feels a little clunky to have to say minLength=n, maxLength=n.

Describe the solution you'd like Implementation of a length parameter to get a word of length n.

Describe alternatives you've considered N/A

Additional context With your permission, I will implement this myself.

vaibhavsingh97 commented 5 years ago

Hi @ErikBoesen Thanks for raising the issue, and I am happy to review your PR ❤️

vaibhavsingh97 commented 5 years ago

Sorry, I think you missed this in the documentation, but minLength and maxLength already exist, you have to just pass as a parameter in the function, it's an optional parameter. please check: https://github.com/vaibhavsingh97/random-word#advance-usage

ErikBoesen commented 5 years ago

I did read that in the documentation. What I'm suggesting is that it be possible to have one number specified for length. Right now if I want, say, a five-letter word, I have to specify maxLength=5, minLength=5, which makes the call unnecessarily verbose.