[issue4016] improve linecache: reuse tokenize.detect_encoding() and io.open()

STINNER Victor report at bugs.python.org
Thu Oct 2 16:42:04 CEST 2008


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

linecache uses it own code to detect a Python script encoding whereas 
a function tokenize.detect_encoding() already exists. It does also 
convert bytes => unicode conversion of the file lines whereas open() 
already supports this feature.

----------
components: Library (Lib)
files: linecache_refactor.patch
keywords: patch
messages: 74165
nosy: haypo
severity: normal
status: open
title: improve linecache: reuse tokenize.detect_encoding() and io.open()
versions: Python 3.0
Added file: http://bugs.python.org/file11678/linecache_refactor.patch

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


More information about the Python-bugs-list mailing list