kennethreitz / crayons

Text UI colors for Python.
https://pypi.python.org/pypi/crayons
MIT License
423 stars 30 forks source link

__str__ should always return a str type #25

Closed chrisphilip322 closed 4 years ago

MasterOdin commented 4 years ago

Thanks for this. Sorry it took so long for the review.

I've fixed this in a different way with fb04b80e3c02695a2d1df3f4a02e317106eaccf3 as doing this fixes that issue, but then causes issues when doing len(crayons.red(1234)). Not sure a case where someone would pass in an object to crayons, edit the object, and then go to print it, so probably safe to just do a str() conversion in the constructor.

chrisphilip322 commented 4 years ago

Thanks for the fix!