2022-09-16 09:57:38 -04:00
|
|
|
# Checks that an instance type inheriting from a native base that uses
|
|
|
|
# MP_TYPE_FLAG_ITER_IS_STREAM will still have a getiter.
|
|
|
|
|
2022-08-18 02:57:45 -04:00
|
|
|
import io
|
2022-09-16 09:57:38 -04:00
|
|
|
|
|
|
|
a = io.StringIO()
|
|
|
|
a.write("hello\nworld\nmicro\npython\n")
|
|
|
|
a.seek(0)
|
|
|
|
|
|
|
|
for line in a:
|
|
|
|
print(line)
|
|
|
|
|
|
|
|
class X(io.StringIO):
|
|
|
|
pass
|
|
|
|
|
|
|
|
b = X()
|
|
|
|
b.write("hello\nworld\nmicro\npython\n")
|
|
|
|
b.seek(0)
|
|
|
|
|
|
|
|
for line in b:
|
|
|
|
print(line)
|