majiidd / persiantools

Jalali date and datetime with other tools
MIT License
166 stars 20 forks source link

Minor improvement in utils.py #16

Closed rainyman2012 closed 2 years ago

rainyman2012 commented 2 years ago

When we pass an empty string it's good to handle the exception. Users can handle the empty input when the program raises an exception. by the way, it's a common input and we can handle it on behalf of them.

majiidd commented 2 years ago

Thank you Ehsan jaan for your consideration. In most cases, input/data validation is performed by upper layers, and this if just adds more overhead. Due to the nature of the language, it's better to check data types, not values.