[issue25547] Improve repr for files to show whether the file is open or closed.

2017-03-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution: not a bug -> out of date
status: pending -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25547] Improve repr for files to show whether the file is open or closed.

2016-01-03 Thread Ezio Melotti

Changes by Ezio Melotti :


--
resolution:  -> not a bug
stage: needs patch -> resolved
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25547] Improve repr for files to show whether the file is open or closed.

2015-11-03 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

>>> f = open('/dev/null', 'rb', buffering=0)
>>> f
<_io.FileIO name='/dev/null' mode='rb' closefd=True>
>>> f.close()
>>> f
<_io.FileIO [closed]>

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25547] Improve repr for files to show whether the file is open or closed.

2015-11-03 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Good news in Python 3.5, the __repr__ for locks now indicates whether the lock 
is in a locked state.   Bad news for Python 3.x, the __repr__ for files lost 
the indication of the file's open/closed status:

Python 3:
-
  $ python3.5
  Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19) 
  [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> open('hamlet.txt')
  <_io.TextIOWrapper name='hamlet.txt' mode='r' encoding='UTF-8'>

Python 2:
-
  # python2.7
  Python 2.7.10 (v2.7.10:15c95b7d81dc, May 23 2015, 09:33:12) 
  [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> open('hamlet.txt')
  

^- status

--
assignee: pitrou
messages: 254007
nosy: pitrou, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Improve repr for files to show whether the file is open or closed.
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com