Expand description
Values, shapes, collections, allocator, and garbage collector for the kohebi Python runtime
Status: what is here is the shape of a Python value and the arithmetic and
printing that go with it, which is what M1 needs to run a program. The
representation is not the one in docs/spec/03-object-model.md: that is a
tagged 64-bit word over shaped heap objects, and it is what the memory
target depends on. M1 is correctness, so Object is an enum for now and
the swap is a job for the crate rather than for its callers. The allocator
and collector in docs/spec/04-memory-and-gc.md do not exist yet.
Re-exports§
pub use dict::Dict;pub use dict::Set;pub use error::Error;pub use error::Kind;pub use error::Result;pub use exception::Exception;pub use float::DotZero;pub use float::float_repr;pub use hash::Key;pub use hash::Unhashable;pub use int::DivideByZero;pub use int::Int;pub use native::Native;pub use object::Object;pub use ops::Compare;pub use printable::is_printable;pub use slice::Indices;pub use slice::Slice;pub use text::Str;pub use text::StrBuf;pub use text::bytes_repr;pub use text::str_repr;
Modules§
- casing
- Changing the case of a string, which is six questions rather than one.
- classify
- The questions a string answers about itself.
- dict
- The dict and the set.
- error
- Exceptions, before there are classes to make them out of.
- exception
- An exception as something a program holds, rather than as something the runtime returns.
- float
reprof a float, which is not what any Rust format specifier produces.- hash
- Python’s hash, and the key type a dict is built on.
- int
- Python integers, which have no upper bound.
- native
- Values this crate does not know the shape of.
- object
- What a value is while a program is running.
- ops
- The operators, and the exact words CPython uses when they do not apply.
- printable
- Which code points
reprprints literally, generated from Unicode 16.0.0. - slice
slice, which is what a subscript with a colon in it builds.- text
- Python strings, and how
reprprints them and bytes.
Constants§
- SPEC
- The design documents that govern this crate.