[New-bugs-announce] [issue10750] "raw" attribute of buffered IO objects is assignable

Antoine Pitrou report at bugs.python.org
Tue Dec 21 21:21:59 CET 2010


New submission from Antoine Pitrou <pitrou at free.fr>:

This really looks backwards:

>>> f = open("LICENSE", "rb")
>>> f.name = "bar"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: attribute 'name' of '_io.BufferedReader' objects is not writable
>>> f.raw = None
__main__:1: ResourceWarning: unclosed file <_io.FileIO name='LICENSE' mode='rb'>
>>>

----------
components: IO, Library (Lib)
messages: 124451
nosy: amaury.forgeotdarc, benjamin.peterson, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: "raw" attribute of buffered IO objects is assignable
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10750>
_______________________________________


More information about the New-bugs-announce mailing list