colour.plotting.LABELS_PLANCKIAN_LOCUS_DEFAULT#

colour.plotting.LABELS_PLANCKIAN_LOCUS_DEFAULT = CanonicalMapping({'Default': ..., 'Mireds': ...})#

Represent a delimiter and case-insensitive dict-like object supporting both slug keys (SEO-friendly, human-readable versions with delimiters) and canonical keys (slugified keys without delimiters).

This class extends MutableMapping to provide flexible key matching that accepts various transformations of the original key while maintaining the original key structure for storage. Item keys must be str-like objects supporting the str.lower() method. Set items using the specified original keys. Retrieve, delete, or test item existence by transforming the query key through the following sequence:

  • Original Key

  • Lowercase Key

  • Slugified Key

  • Canonical Key

For example, using the McCamy 1992 key:

  • Original Key : McCamy 1992

  • Lowercase Key : mccamy 1992

  • Slugified Key : mccamy-1992

  • Canonical Key : mccamy1992

Parameters:
  • data – Data to store into the delimiter and case-insensitive dict-like object at initialisation.

  • kwargs – Key / value pairs to store into the mapping at initialisation.

Attributes

Methods

Examples

>>> methods = CanonicalMapping({"McCamy 1992": 1, "Hernandez 1999": 2})
>>> methods["mccamy 1992"]
1
>>> methods["MCCAMY 1992"]
1
>>> methods["mccamy-1992"]
1
>>> methods["mccamy1992"]
1