Expand description
This crate contains most python logic.
- Compilation
- Bytecode
- Import mechanics
- Base objects
Re-exports§
pub use self::convert::TryFromBorrowedObject;
pub use self::convert::TryFromObject;
pub use self::object::AsObject;
pub use self::object::Py;
pub use self::object::PyAtomicRef;
pub use self::object::PyExact;
pub use self::object::PyObject;
pub use self::object::PyObjectRef;
pub use self::object::PyPayload;
pub use self::object::PyRef;
pub use self::object::PyRefExact;
pub use self::object::PyResult;
pub use self::object::PyWeakRef;
pub use self::vm::Context;
pub use self::vm::Interpreter;
pub use self::vm::Settings;
pub use self::vm::VirtualMachine;
pub use rustpython_common as common;
pub use rustpython_literal as literal;
Modules§
- buffer
- builtins
- This package contains the python basic/builtin types
7 common PyRef type aliases are exposed - PyBytesRef, PyDictRef, PyIntRef, PyListRef, PyStrRef, PyTypeRef, PyTupleRef
Do not add more PyRef type aliases. They will be rare enough to use directly PyRef
. - byte
- byte operation APIs
- bytecode
- Implement python as a virtual machine with bytecode. This module implements bytecode structure.
- cformat
- Implementation of Printf-Style string formatting as per the Python Docs.
- class
- Utilities to define a new Python class
- compiler
- convert
- eval
- exceptions
- format
- frame
- frozen
- function
- import
- iter
- object
- ospath
- prelude
- protocol
- py_io
- readline
- recursion
- scope
- sequence
- signal
- sliceable
- source_
code - stdlib
- suggestion
- types
- utils
- version
- vm
- Implement virtual machine to run instructions.
- warn
Macros§
- atomic_
func - class_
or_ notimplemented - define_
methods - extend_
class - extend_
module - identifier
- match_
class - Macro to match on the built-in class of a Python object.
- named_
function - py_
class - py_
compile - py_
freeze - py_
namespace
Attribute Macros§
- pyclass
- pyexception
- Helper macro to define
Exception
types. More-or-less is an alias topyclass
macro. - pymodule
Derive Macros§
- From
Args - PyPayload
- PyStruct
Sequence - Traverse
- use on struct with named fields like
struct A{x:PyRef<B>, y:PyRef<C>}
to implTraverse
for datatype. - TryInto
PyStruct Sequence