New submission from Dwight Guth:
Consider the following program:
import io
class A(io.IOBase):
def __init__(self):
self.x = 5
def read(self, limit=-1):
self.x -= 1
if self.x > 0:
return b"5"
return b""
def seek(self, offset, whence=0
Dwight Guth added the comment:
I was programming something today and thought I should let you know I came
across a situation where the current behavior of this function is able to
expose what seems to be raw memory to the user.
import io
class A(io.RawIOBase):
def readinto(self, b
New submission from Dwight Guth:
The following python program causes cpython to crash:
class A:
global __class__
def a(self):
super()
I get the following output on the console:
bug.py:2: SyntaxWarning: name '__class__' is assigned to before global
declaration
global