8000 Implement STORE_GLOBAL · go-python/gpython@287a1df · GitHub
[go: up one dir, main page]

Skip to content

Commit 287a1df

Browse files
committed
Implement STORE_GLOBAL
1 parent be4d292 commit 287a1df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vm/eval.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ func do_DELETE_ATTR(vm *Vm, namei int32) {
766766
// Works as STORE_NAME, but stores the name as a global.
767767
func do_STORE_GLOBAL(vm *Vm, namei int32) {
768768
defer vm.CheckException()
769-
vm.NotImplemented("STORE_GLOBAL", namei)
769+
vm.frame.Globals[vm.frame.Code.Names[namei]] = vm.POP()
770770
}
771771

772772
// Works as DELETE_NAME, but deletes a global name.

0 commit comments

Comments
 (0)
0