We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71495c1 commit 31a80a2Copy full SHA for 31a80a2
src/io.jl
@@ -82,7 +82,14 @@ function pyio_initialize()
82
closed.get(self) = @with_ioraise(!isopen(pyio_jl(self)))
83
encoding.get(self) = "UTF-8"
84
fileno(self) = @with_ioraise(fd(pyio_jl(self)))
85
- flush(self) = @with_ioraise(flush(pyio_jl(self)))
+ flush(self) = begin
86
+ @with_ioraise begin
87
+ io = pyio_jl(self)
88
+ if method_exists(flush, Tuple{typeof(io)})
89
+ flush(io)
90
+ end
91
92
93
isatty(self) = isa(pyio_jl(self), Base.TTY)
94
readable(self) = isreadable(pyio_jl(self))
95
writable(self) = iswritable(pyio_jl(self))
0 commit comments