cottax.core.maths.mints module

A purpose a name is derived for: a Mint is a value, its class the purpose, and calling it on a name gives the derived name (Copy()(y) is ^copy.y), so it is the PlaceToPlace an op is handed. How a class of names wears one is its Minting, registered by the place.

class Mint(*_: Any, **__: Any)[source]

Bases: Frozen

A purpose, by its class: what a name is derived for. Its spelling (^copy) labels a derived name; nothing finds a purpose by it.

class Minting[P][source]

Bases: Answer, Generic[P]

How a class of names wears a purpose.

about: AbstractClassVar[Any] = (<class 'cottax.core.maths.places.Place'>, Label)

a class, a type alias of one, a protocol, or a tuple of those. @answers refuses a class that is none; a protocol is met by shape, which a class cannot be asked.

Type:

What the interface is answered per, bound by the interface

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

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

Return type:

P

abstractmethod mint_of(name: P)[source]

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

Return type:

Mint | None

abstractmethod unminted(name: P)[source]

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

Return type:

P

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

name in m’s namespace, as its class’s Minting says: refused where none does.

Return type:

P

mint_of(name: Any)[source]

The purpose name wears outermost; None for one nobody minted, or whose class has no Minting.

Return type:

Mint | None

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

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

Return type:

P

class Copy[source]

Bases: Mint

A cut’s copy of a variable: ^copy.y.

class Closure[source]

Bases: Mint

Where a closure of cuts binds: ^closure.<the cycle’s first member>.