Mertcan added the comment:
For example, consider the libraries of stdlib and PyPI that are available now
and may be in the future. In libraries like Tkinter or Turtle, a universal
color class can make the code clearer. Color operations can also be performed
by representing the Color class. For example, deriving a CLI color code from
the RGB values it represents. Doesn't such a thing provide more advanced
possibilities for the existing cli library (cmd) and reduce the need for PyPI
API?
I think this can provide a common use for WEB and GUI libraries. It can also be
beneficial in terms of performance as it can reduce the number of parameters
for most functions.
Python is a programming language widely used as CLI. With a built-in color
library, wouldn't we increase the appeal and language coverage? I see that
there are many libraries on PyPI regarding colors, and most of them are built
on CLI. Some of these are really used too much.
We often encounter issues like "How can I print in color in Console?" in places
like Stackoverflow.
I think that many color-related or color libraries do not have a color class on
stlib, so it might be too crowded for them to make a color class for
themselves, especially when using multiple color-oriented libraries. Even if
they don't make a special class for them, the number of parameters will
naturally be higher. However, I think a standard color class can prevent all of
these and increase readability.
--
___
Python tracker
<https://bugs.python.org/issue41783>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com