This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Lib/io.py open uses unset "bs"
Type: Stage:
Components: Library (Lib) Versions: Python 3.0
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, jimjjewett
Priority: normal Keywords:

Created on 2007-03-13 02:28 by jimjjewett, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg31501 - (view) Author: Jim Jewett (jimjjewett) Date: 2007-03-13 02:28
Within the open function, it says
"""
        try:
            bs = os.fstat(raw.fileno()).st_blksize
        except (os.error, AttributeError):
            if bs > 1:
                buffering = bs
"""

Since this is the first use of name "bs", I wouldn't expect it to have any value after an Exception.  If this is actually correct, it at least deserves a comment.

-----------------

(second issue)

_PyFileIO sets self._writable but doesn't use it (even in writable())
msg31502 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-03-18 03:42
Thanks for reporting this!

First issue: Committed revision 54424.

Second issue: Committed revision 54425.
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44706
2008-01-06 22:29:46adminsetkeywords: - py3k
versions: + Python 3.0
2007-03-13 02:28:05jimjjewettcreate