(
&self,
name: &str,
dict: PyDictRef,
doc: Option<PyStrRef>,
)
| 45 | } |
| 46 | |
| 47 | pub fn new_module( |
| 48 | &self, |
| 49 | name: &str, |
| 50 | dict: PyDictRef, |
| 51 | doc: Option<PyStrRef>, |
| 52 | ) -> PyRef<PyModule> { |
| 53 | let module = PyRef::new_ref( |
| 54 | PyModule::new(), |
| 55 | self.ctx.types.module_type.to_owned(), |
| 56 | Some(dict), |
| 57 | ); |
| 58 | module.init_dict(self.ctx.intern_str(name), doc, self); |
| 59 | module |
| 60 | } |
| 61 | |
| 62 | pub fn new_scope_with_builtins(&self) -> Scope { |
| 63 | Scope::with_builtins(None, self.ctx.new_dict(), self) |
no test coverage detected