Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit c4bfdf4

Browse files
committed
print to sys.stdout, not Stdout
1 parent b35a243 commit c4bfdf4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

runtime/core.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,11 @@ func Print(f *Frame, args Args, nl bool) *BaseException {
683683
} else if len(args) > 0 {
684684
end = " "
685685
}
686-
return pyPrint(f, args, " ", end, Stdout.ToObject())
686+
file, raised := SysmoduleDict.GetItemString(f, "stdout")
687+
if raised != nil {
688+
return raised
689+
}
690+
return pyPrint(f, args, " ", end, file)
687691
}
688692

689693
// Repr returns a string containing a printable representation of o. This is

0 commit comments

Comments
 (0)