orthonym.assembly.prefix_derivation#
Note
Internal API. Names and behaviour may change between releases.
A substituent prefix name that carries how its writer built it.
(the Blue Book): “any component which is substituted automatically
requires use of the multiplicative forms ‘bis’, ‘tris’, etc.” Whether a prefix is substituted is a fact of the derivation its writer chose (‘tert-butyl’ is simple, ‘2-methylpropan-2-yl’ is substituted; ‘bicyclo[3.2.1]octan-3-yl’ is simple although it holds brackets, (f):7104), so the writer records it with the name it returns.
The value is a str subclass: it equals, hashes, sorts and serialises as its text, so
dict keys, sort keys, JSON and the memo are unchanged. Pickle and copy keep the
record; any string operation (slice, strip, f-string, concatenation) returns a plain
str without it, and a name without a record is decided as before
(derivation_of returns None). A writer step that adds marks or a descriptor to a
recorded name keeps the record with:func:carried.
- class orthonym.assembly.prefix_derivation.PrefixDerivation(substituted, enclosed=None)#
Bases:
objectsubstituted: the writer attached at least one detachable substituent prefix to the parent group of this prefix (c), (a); compound and complex groups, /.enclosed: the prefix takes enclosing marks wherever it is cited, the Blue Book), as its writer decided;Noneleaves the marks to the predicates ofnaming_utils.- substituted: bool#
- enclosed: bool | None = None#
- class orthonym.assembly.prefix_derivation.PrefixName(text, derivation)#
Bases:
strThe text of a substituent prefix and the
PrefixDerivationof its writer.
- orthonym.assembly.prefix_derivation.built(text, *, substituted, enclosed=None)#
textas returned by its writer, with the writer’s facts;Nonestays None.
- orthonym.assembly.prefix_derivation.carried(text, like)#
textislikewith marks or a descriptor added by the same writer chain: it keeps the record oflike(none whenlikehas none).
- orthonym.assembly.prefix_derivation.derivation_of(name)#
The writer’s record of
name, orNonefor a name without one.
- orthonym.assembly.prefix_derivation.with_derivation(text, rec)#
textwith the recordrec(unchanged when either isNone).