orthonym.data.multipliers#
Note
Internal API. Names and behaviour may change between releases.
The multiplying prefixes: di, tri, tetra,... and bis, tris, tetrakis,....
This module is the one source for those words (IUPAC 2013, Table 1.4, the
basic numerical terms, up to icosa / icosakis at 20). The words above 20 are composed,
not tabulated: data.chain_names.multiplying_prefix spells any count from 2 to 9999.
assembly.naming_utils re-exports SIMPLE_MULTIPLIERS and COMPLEX_MULTIPLIERS
(the same dict objects), and a module that needs a table of its own range builds it with
multiplier_table instead of writing the words out again.
It is a leaf: it imports nothing from orthonym. Modules in every package import it
at load time, among them data modules that load before the assembly package, so it must
not depend on them (naming_utils pulls in the whole assembly package).
- orthonym.data.multipliers.multiplier_table(max_n, one=None, kind='simple')#
A new
{count: prefix}dict for the counts2..max_n, in ascending key order.kindpicks the words:"simple"(di, tri,...) or"complex"(bis, tris,...).oneis the word for a count of 1:Noneleaves key 1 out, a string adds it as the first key (""where one unit takes no multiplier,"mono"where it is spelled out). The values come fromSIMPLE_MULTIPLIERS/COMPLEX_MULTIPLIERS, so a site states only the range it needs.Every call returns a fresh dict: a site that edits its table cannot change the table of another site or the shared
*_MULTIPLIERS.max_noutside2..20raisesValueError. Words above 20 are composed, not tabulated (seechain_names.multiplying_prefix), so a larger range is a naming decision at the caller and never a silent truncation here.