curry.utility.shared module

class curry.utility.shared.DefaultDict[source]

Bases: defaultdict

Like defaultdict but recursively copies values.

copy() → a shallow copy of D.
class curry.utility.shared.Shared(ty, obj=None)[source]

Bases: object

Manages an object with copy-on-write semantics. To access the contained object for reading or writing, use the read and write methods, resp. If the object has multiple references, then writing will trigger a copy.

property read
property refcnt
property unique
property write
curry.utility.shared.compose(typefunction, ty)[source]

Composes a type function and type. The type function is a type, such as Shared or DefaultDict, that takes another type as its only argument. The returned object has object-copy semantics.