mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-23 21:10:19 +00:00
...
This commit is contained in:
parent
bcf607c6a0
commit
82385460a0
@ -704,6 +704,12 @@ inline void init_builtins(VM* _vm) {
|
|||||||
ss << "})";
|
ss << "})";
|
||||||
return VAR(ss.str());
|
return VAR(ss.str());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
_vm->bind_method<1>("mappingproxy", "__contains__", [](VM* vm, ArgsView args) {
|
||||||
|
MappingProxy& self = CAST(MappingProxy&, args[0]);
|
||||||
|
StrName key = CAST(Str&, args[1]);
|
||||||
|
return VAR(self.attr().contains(key));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user