mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-17 01:51:39 +09:00
Extend ast module with more nodes. Test send method on generators.
This commit is contained in:
@@ -14,7 +14,7 @@ pub fn init(context: &PyContext) {
|
||||
let ref generator_type = context.generator_type;
|
||||
generator_type.set_attr("__iter__", context.new_rustfunc(generator_iter));
|
||||
generator_type.set_attr("__next__", context.new_rustfunc(generator_next));
|
||||
generator_type.set_attr("__send__", context.new_rustfunc(generator_send));
|
||||
generator_type.set_attr("send", context.new_rustfunc(generator_send));
|
||||
}
|
||||
|
||||
pub fn new_generator(vm: &mut VirtualMachine, frame: Frame) -> PyResult {
|
||||
|
||||
Reference in New Issue
Block a user