colorsys.hls_to_rgb()

colorsys.hls_to_rgb(h, l, s) Convert the color from HLS coordinates to RGB coordinates.

colorsys.rgb_to_hsv()

colorsys.rgb_to_hsv(r, g, b) Convert the color from RGB coordinates to HSV coordinates.

collections.UserString

class collections.UserString([sequence]) Class that simulates a string or a Unicode string object. The instance’s content is kept in a regular string object, which is accessible via the data attribute of UserString instances. The instance’s contents are initially set to a copy of sequence. The sequence can be an instance of bytes, str, UserString (or a subclass) or an arbitrary sequence which can be converted into a string using the built-in str() function. Changed in version 3.5: New metho

colorsys.rgb_to_hls()

colorsys.rgb_to_hls(r, g, b) Convert the color from RGB coordinates to HLS coordinates.

collections.UserList

class collections.UserList([list]) Class that simulates a list. The instance’s contents are kept in a regular list, which is accessible via the data attribute of UserList instances. The instance’s contents are initially set to a copy of list, defaulting to the empty list []. list can be any iterable, for example a real Python list or a UserList object. In addition to supporting the methods and operations of mutable sequences, UserList instances provide the following attribute: data A real

collections.somenamedtuple._source

somenamedtuple._source A string with the pure Python source code used to create the named tuple class. The source makes the named tuple self-documenting. It can be printed, executed using exec(), or saved to a file and imported. New in version 3.3.

collections.UserDict.data

data A real dictionary used to store the contents of the UserDict class.

collections.UserDict

class collections.UserDict([initialdata]) Class that simulates a dictionary. The instance’s contents are kept in a regular dictionary, which is accessible via the data attribute of UserDict instances. If initialdata is provided, data is initialized with its contents; note that a reference to initialdata will not be kept, allowing it be used for other purposes. In addition to supporting the methods and operations of mappings, UserDict instances provide the following attribute: data A real

collections.OrderedDict.popitem()

popitem(last=True) The popitem() method for ordered dictionaries returns and removes a (key, value) pair. The pairs are returned in LIFO order if last is true or FIFO order if false.

collections.somenamedtuple._asdict()

somenamedtuple._asdict() Return a new OrderedDict which maps field names to their corresponding values: >>> p = Point(x=11, y=22) >>> p._asdict() OrderedDict([('x', 11), ('y', 22)]) Changed in version 3.1: Returns an OrderedDict instead of a regular dict.