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 <rep...@bugs.python.org> <http://bugs.python.org/issue26581> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com