cottax.pytree.mint module

A key path’s derived names: the Mint itself is the root segment, a key kind of its own, so a flatten, which only yields the kinds a pytree node registers, never yields a minted name.

class PathMinting[source]

Bases: Minting[Path]

A purpose as the root segment: ^copy.y, and over a minted name ^start.^copy.y.

minted[P: Path](m: Mint, name: P)[source]

name in m’s namespace, over whatever namespace it is in already.

Return type:

P

mint_of(name: Path)[source]

The purpose name wears outermost; None for a name nobody minted.

Return type:

Mint | None

unminted[P: Path](name: P)[source]

name with its outermost purpose dropped; name itself if it wears none.

Return type:

P