[New-bugs-announce] [issue26581] Double coding cookie

Serhiy Storchaka report at bugs.python.org
Thu Mar 17 08:00:36 EDT 2016


New submission from Serhiy Storchaka:

When Python source file contains double coding cookies on different lines, the first wins. When it contains double coding cookies on the same line, the last wins.

PEP 263 was sufficiently vague about this. Now this is clarified (22490711c870). The first coding cookie should always win.

Proposed patch fixes Python tokenizer, the tokenize module, and other places. Tests are taken from issue25643.

----------
components: Interpreter Core, Library (Lib)
files: tokenize_double_coding.patch
keywords: patch
messages: 261909
nosy: gvanrossum, haypo, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Double coding cookie
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file42185/tokenize_double_coding.patch

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


More information about the New-bugs-announce mailing list