kennethreitz / crayons

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

Not for this human… ;) #1

Closed jhermann closed 7 years ago

jhermann commented 7 years ago

Hi, I find this syntax rather inhuman (esp. the 3× repetition):

print('{red} white'.format(red=crayons.red('red')))

and would very much prefer:

print('{red}important {foo}{off}normal text {userval}'
      .format(**crayons.palette(userval=1, foo='bar')))

(with the arguments being optional of course). Also, those two variants can live in harmony.