[issue15903] Make rawiobase_read() read directly to bytes object

2013-06-01 Thread Dwight Guth
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

[issue18082] Inconsistent behavior of IOBase methods on closed files

2013-05-28 Thread Dwight Guth
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 b5 return b def seek(self, offset, whence=0): return 0 def write

Minor consistency question in io.IOBase

2013-05-27 Thread dwight . guth
Hi, so, I don't necessarily know if this is the right place to ask this question since it's kindof a rather technical one which gets into details of the python interpreter itself, but I thought I'd start here and if nobody knew the answer, they could let me know if it makes sense to ask on

[issue17983] global __class__ statement in class declaration

2013-05-15 Thread Dwight Guth
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 __class__