[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Proposed patch renames METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS > and makes bare METH_FASTCALL be used for functions with > positional-only parameters. This eliminates small cost that > these functions pay for handling empty keywords: calling > _PySta

[issue29464] Specialize FASTCALL for functions with positional-only parameters

2017-06-04 Thread Stefan Behnel
Stefan Behnel added the comment: I looked up this change again and was surprised that it still wasn't applied. It feels to me that it makes sense already for reasons of consistency. Any time frame for changing it? I'd like to use METH_FASTCALL in Cython in a future-proof way. --

[issue8136] urllib.unquote decodes percent-escapes with Latin-1

2017-06-04 Thread karl
karl added the comment: #8143 was fixed. Python 2.7.10 (default, Feb 7 2017, 00:08:15) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> urllib.unquote(u"%CE%A3") u'\xce\xa3' What sho

[issue29535] datetime hash is deterministic in some cases

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me that this difference is not intentional. This is just a consequence of the fact that __hash__ functions for some of these objects use the hash of the pickle state which is a bytes object. -- nosy: +serhiy.storchaka ___

[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Julien, the result should be printed to stdout. I tried: $ ./python -m unittest test.test_builtin --list-tests doctest.DocTestCase.runTest doctest.DocTestCase.runTest doctest.DocTestCase.runTest doctest.DocTestCase.runTest doctest.DocTestCase.ru

[issue29535] datetime hash is deterministic in some cases

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Rather than changing the documentation, I would prefer to have this fixed for date/time/datetiem unless MAL has a reason not to make the change. For timezone, I don't think we really care. For timedelta, it is reasonable to always be the same hash. It is

[issue18280] Documentation is too personalized

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fred, do you want to opine on this? In some cases, like heapq.py, the personal touch is an essential and beautiful part of the presentation and is a cherished part of Python. In other cases, it seems unnecessary or a little off-putting, so perhaps a few ch

[issue25910] Fixing links in documentation

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you! What is left: * Rewrite the text of license.rst for referring the Zope Corporation in the past tense and remove the link (and maybe add the reference to the Zope Foundation if it is related). * Mark historical links http://www.vex.net/parnassus/

[issue30571] Add integer formatting code for fixed-width signed arithmetic (2's complement)

2017-06-04 Thread Raymond Hettinger
New submission from Raymond Hettinger: The current 'b' formatting code in inconvenient for emulating, demonstrating, and teaching two's complement arithmetic. The problem is that negative inputs are always formatted with a minus sign. I propose that some formatting code be provided for fixed

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset ce40550acd3a8928bb6fef4d4e73642a8a69745d by Mariatta (csabella) in branch '3.6': bpo-30538: Update count() in Functional Programming HOWTO (GH-1919) (GH-1943) https://github.com/python/cpython/commit/ce40550acd3a8928bb6fef4d4e73642a8a69745d ---

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset b32fb6c1fb6cdf019817176f573e60c0923a6e22 by Mariatta (csabella) in branch '3.5': bpo-30538: Update count() in Functional Programming HOWTO (GH-1919) (GH-1944) https://github.com/python/cpython/commit/b32fb6c1fb6cdf019817176f573e60c0923a6e22 ---

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks Mariano. I merged your PR and it's been backported to 3.5 and 3.6. -- resolution: -> fixed stage: backport needed -> resolved status: open -> closed ___ Python tracker ___

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 1f04b900861686351977f6a7d51afa5fdc181b82 by Mariatta in branch '3.5': bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1954) https://github.com/python/cpython/commit/1f04b900861686351977f6a7d51afa5fdc181b82 -- __

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 86eb93fae6fc5bf121de815b82697f2bc5bc126c by Mariatta in branch '3.6': bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953) https://github.com/python/cpython/commit/86eb93fae6fc5bf121de815b82697f2bc5bc126c -- __

[issue29555] Update Python Software Foundation Copyright Year

2017-06-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- assignee: -> docs@python components: +Documentation nosy: +docs@python ___ Python tracker ___ ___ Pyt

[issue30568] README Formatting

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks :) Yes the issue with copyright in the docs is still pending. I'm closing this as a duplicate. -- nosy: +Mariatta resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Update Python Software Foundation Copyright Yea

[issue29555] Update Python Software Foundation Copyright Year

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Any update about this? Who do we need to talk to in order to move forward? Thanks. -- nosy: +Mariatta ___ Python tracker ___ _

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- stage: patch review -> backport needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +2025 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- pull_requests: +2024 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: New changeset 1bced56567335745f91676192fc39c06aab30da9 by Mariatta (Mariano Anaya) in branch 'master': bpo-30530: Update Descriptor How To Documentation (GH-1845) https://github.com/python/cpython/commit/1bced56567335745f91676192fc39c06aab30da9 -- _

[issue30570] issubclass segfaults on objects with weird __getattr__

2017-06-04 Thread Louie Lu
Louie Lu added the comment: Without this segfault, I think you do a wrong operation. In other cases, for example: >>> issubclass(10, int) Traceback (most recent call last): File "", line 1, in TypeError: issubclass() arg 1 must be a class `issubclass` will return TypeError on instance, if

[issue30570] issubclass segfaults on objects with weird __getattr__

2017-06-04 Thread Louie Lu
Louie Lu added the comment: I can reproduce this bugs on 3.7, Linux. Python 3.7.0a0 (heads/master:d3bedf356a, Jun 5 2017, 10:21:52) [GCC 6.3.1 20170306] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class Foo(object): ... def __getattr__(self, attr): ...

[issue30570] issubclass segfaults on objects with weird __getattr__

2017-06-04 Thread Bruno Oliveira
Changes by Bruno Oliveira : -- nosy: +Bruno Oliveira ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue30570] issubclass segfaults on objects with weird __getattr__

2017-06-04 Thread Daniel Lepage
Daniel Lepage added the comment: I tried it on python 2.7.12 and python 2.6.9 since I had them lying around and got the same behavior. -- ___ Python tracker ___

[issue30570] issubclass segfaults on objects with weird __getattr__

2017-06-04 Thread Daniel Lepage
New submission from Daniel Lepage: The following code causes a segmentation fault: class Failure(object): def __getattr__(self, attr): return (self, None) issubclass(Failure(), int) I am running a macbook pro, OS X 10.12.4, and have observed the problem in python 3.5.2, 3.6.0, and 3

[issue30570] issubclass segfaults on objects with weird __getattr__

2017-06-04 Thread Daniel Lepage
Changes by Daniel Lepage : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2017-06-04 Thread R. David Murray
R. David Murray added the comment: Can you provide a reproducer, please? -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bu

[issue25910] Fixing links in documentation

2017-06-04 Thread Guido van Rossum
Guido van Rossum added the comment: I've done what I can for the logos: http://www.pythonlabs.com/logos.html -- ___ Python tracker ___ ___

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread R. David Murray
R. David Murray added the comment: Actually, the API discussion may be short: we already have a 'validate' option, whose spirit matches with this, so adding the check for the padding issue to that of the non-alphabet characters check would seem to me to be quite reasonable. -- __

[issue30417] [buildbot] Disable the cpu resources on slow buildbots

2017-06-04 Thread Zachary Ware
Changes by Zachary Ware : -- pull_requests: +2023 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue30523] unittest: add --list-tests option to only display the list of test names, don't run tests

2017-06-04 Thread STINNER Victor
STINNER Victor added the comment: I used ./python -m test Lib/test/test_threading.py --list-tests. I would like to be able to use this feature in regrtest too: ./python -m test test_threading --list-tests Sadly, this option already exists and only return test files, not test methods.

[issue12067] Doc: remove errors about mixed-type comparisons.

2017-06-04 Thread Cheryl Sabella
Cheryl Sabella added the comment: It appears all the patches for this issue have been applied. Is the only open item the changes to test_compare? -- nosy: +csabella ___ Python tracker

[issue26602] argparse doc introduction is inappropriately targeted

2017-06-04 Thread Cheryl Sabella
Cheryl Sabella added the comment: If it helps at all, I first learned about argparse a few weeks ago. I first went to the doc page and then immediately went to the tutorial, as suggested. I didn't find it difficult or off-putting at all. In fact, I loved that there was a tutorial that it ex

[issue30568] README Formatting

2017-06-04 Thread Cheryl Sabella
Cheryl Sabella added the comment: I had made the same suggestion a few months ago and found that it had already been discussed. :-) Duplicate of http://bugs.python.org/issue29555. -- nosy: +csabella ___ Python tracker

[issue30569] Tutorial section 2.1 has *nix example at 3.7, but Windows at 3.6

2017-06-04 Thread Cheryl Sabella
New submission from Cheryl Sabella: https://docs.python.org/3.7/tutorial/interpreter.html The first lines for the location/command have been updated for 3.7, but next paragraph for Windows has not been updated. -- assignee: docs@python components: Documentation messages: 295142 nosy: c

[issue18280] Documentation is too personalized

2017-06-04 Thread Cheryl Sabella
Cheryl Sabella added the comment: Would it be OK for me to tackle this? -- nosy: +csabella ___ Python tracker ___ ___ Python-bugs-list

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-04 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +2022 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-04 Thread Cheryl Sabella
Changes by Cheryl Sabella : -- pull_requests: +2021 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue30568] README Formatting

2017-06-04 Thread James Lu
New submission from James Lu: - Shorten the Copyright statement from a list of years (`2001, 2002, 2003, ... 2017`) into `2001-2017` - Extend copyright date at end of README from 2016 to 2017 - Ensure that there are two newlines before every header throughout the file (this was the original

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-04 Thread Cheryl Sabella
Cheryl Sabella added the comment: Thank you. And thank you for explaining about the strings. That's what I suspected, so I appreciate you confirming it. -- ___ Python tracker

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread Monty Evans
Monty Evans added the comment: Ah, that is enlightening. It hadn't occured to me that you might want to allow for minor mistakes in the encoder - I must've missed that part of the standard. Thanks to both of you for clearing that up :). -- ___ Pytho

[issue30567] Leak in sys.getwindowsversion

2017-06-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- stage: -> backport needed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue30567] Leak in sys.getwindowsversion

2017-06-04 Thread Ned Deily
Changes by Ned Deily : -- components: +Windows -Interpreter Core nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___

[issue30567] Leak in sys.getwindowsversion

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 48fb766f70d9ca9d5934cbddbe8d8e7972cb6343 by Serhiy Storchaka (Segev Finer) in branch 'master': bpo-30567: Fix refleak in sys.getwindowsversion (#1940) https://github.com/python/cpython/commit/48fb766f70d9ca9d5934cbddbe8d8e7972cb6343 --

[issue30530] Descriptors HowTo: Example on function.__get__ needs update

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Mariatta, feel free to apply and backport once the CLA is signed. -- assignee: docs@python -> Mariatta nosy: +Mariatta, rhettinger ___ Python tracker ___

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thank you for the PR. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue30538] Functional Programming HOWTO describes one argument itertools.count()

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 9be4ff359daa67cde6246494f643ed7cd2825d46 by Raymond Hettinger (csabella) in branch 'master': bpo-30538: Update count() in Functional Programming HOWTO (#1919) https://github.com/python/cpython/commit/9be4ff359daa67cde6246494f643ed7cd2825d46 -

[issue30558] [Suggestion] Improve documentation for set() API

2017-06-04 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyth

[issue30567] Leak in sys.getwindowsversion

2017-06-04 Thread Segev Finer
Changes by Segev Finer : -- pull_requests: +2019 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue30567] Leak in sys.getwindowsversion

2017-06-04 Thread Segev Finer
Changes by Segev Finer : -- nosy: +eryksun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue30461] glob returns results in undeterministic order

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, we're going to reject this patch for the reasons discussed in the two other referenced patches. If a user wants sorted order, they can effortlessly specify that with sorted(glob('*.cpp')). -- nosy: +rhettinger resolution: not a bug -> reject

[issue30567] Leak in sys.getwindowsversion

2017-06-04 Thread Segev Finer
New submission from Segev Finer: There is a ref leak in sys.getwindowsversion due to using PyTuple_Pack and forgetting that it increments the ref count of passed in objects. Found here: https://github.com/python/cpython/pull/1927#issuecomment-306019512. Clearly shows up in python -m test -R 3:

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread R. David Murray
R. David Murray added the comment: Not only is it conforming, it is required, since the primary use (originally) of the base64 module was in the email package, where generous interpretation of the input is the standard. This does not mean that adding a strict mode would be out of line, but tha

[issue26656] Documentation for re.compile is a bit outdated

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I think the sentence is fine as-is. The "which can be used" part doesn't purport to be all inclusive. I rather like that at match() and search() are mentioned -- this is better than more vague reference to "the methods described below" -- and this

[issue23532] add example of 'first match wins' to regex "|" documentation?

2017-06-04 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Serhiy that the docs correctly and completely describe the behavior. -- nosy: +rhettinger status: pending -> open ___ Python tracker _

[issue23532] add example of 'first match wins' to regex "|" documentation?

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >From the documentation: """ As the target string is scanned, REs separated by ``'|'`` are tried from left to right. When one pattern completely matches, that branch is accepted. This means that once ``A`` matches, ``B`` will not be tested further, even if i

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2017-06-04 Thread Vikram Hegde
Changes by Vikram Hegde : -- nosy: -Vikram Hegde ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue26656] Documentation for re.compile is a bit outdated

2017-06-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- keywords: +easy status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue30566] punycode codec raises IndexError in decode_generalized_number()

2017-06-04 Thread Vikram Hegde
New submission from Vikram Hegde: Here is the relevant code snippet from decode_generalized_number() in punycode.py try: char = ord(extended[extpos]) except IndexError: if errors == "strict": raise UnicodeError("incomplete punicode string")

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread Gareth Rees
Gareth Rees added the comment: RFC 4648 section 3.5 says: The padding step in base 64 and base 32 encoding can, if improperly implemented, lead to non-significant alterations of the encoded data. For example, if the input is only one octet for a base 64 encoding, then all six bits of

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread Monty Evans
Changes by Monty Evans : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue24744] Lack of type checks in pkgutil.walk_packages and friends

2017-06-04 Thread Sanyam Khurana
Sanyam Khurana added the comment: I've updated the PR with required changes along with the test. Please have a look and let me know if any changes are needed. -- ___ Python tracker

[issue11822] Improve disassembly to show embedded code objects

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please look at the patch Raymond? Is this what you wanted? -- ___ Python tracker ___ ___

[issue30565] PEP 538: default to skipping warning for implicit locale coercion?

2017-06-04 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue29456] bug in unicodedata.normalize: u1176, u11a7 and u11c3

2017-06-04 Thread Wonsup Yoon
Wonsup Yoon added the comment: Is there anything need more? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24340] co_stacksize estimate can be highly off

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This isn't so easy. Seems the simplest way to solve this issue is implementing issue17611. -- ___ Python tracker ___

[issue28206] signal.Signals not documented

2017-06-04 Thread desbma
Changes by desbma : -- pull_requests: +2018 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue28180] sys.getfilesystemencoding() should default to utf-8

2017-06-04 Thread Nick Coghlan
Nick Coghlan added the comment: The PEP 538 PR is mostly complete now, but I created https://bugs.python.org/issue30565 to track making a follow-up decision on whether or not we really want to emit a warning on *successful* implicit locale coercion. The pre-release What's New entry for PEP 53

[issue30565] PEP 538: default to skipping warning for implicit locale coercion?

2017-06-04 Thread Nick Coghlan
New submission from Nick Coghlan: This is a follow-up to PEP 538 that reflects the uncertainty over whether or not the warning on *successful* implicit locale coercion is a good idea. The argument for this warning is that it alerts redistributors, system integrators, and application developers

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread Monty Evans
Changes by Monty Evans : Added file: http://bugs.python.org/file46923/b64_decoding.py ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue24340] co_stacksize estimate can be highly off

2017-06-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm against backporting performance improvements which don't fix a severe regression. -- ___ Python tracker ___ ___

[issue24340] co_stacksize estimate can be highly off

2017-06-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 1938 tries to balance the stack effect computation for try/except and try/finally. I'm not sure that it is worth backporting. Noised Antoine and Benjamin as people related to issue3021. -- nosy: +benjamin.peterson, pitrou stage: needs patch -> pat

[issue24340] co_stacksize estimate can be highly off

2017-06-04 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +2017 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30461] glob returns results in undeterministic order

2017-06-04 Thread Bernhard M. Wiedemann
Bernhard M. Wiedemann added the comment: >From my performance measurements, the overhead was negligible (not even >counting the processing done on files returned by glob). And also glob in C, bash, perl all do sort by default and these are generally pretty fast languages, yet they still chose

[issue30414] multiprocesing.Queue silently ignore messages after exc in _feeder

2017-06-04 Thread Thomas Moreau
Thomas Moreau added the comment: I think this is a good solution as it let the user define easily the behavior it needs in other situation too. I would recommend adding the object responsible for the failure to the _on_queue_thread_error callback. This would simplify the error handling. @@ -

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread Monty Evans
New submission from Monty Evans: Tested in Python 2.7 and 3.5 - the base64 module contains a couple of decoding methods, 'standard_b64decode()' and 'b66decode()' which incorrectly decode certain invalid base64 strings. This is outlined in detail here: "https://stackoverflow.com/questions/44347

[issue30564] Base64 decoding gives incorrect outputs.

2017-06-04 Thread Monty Evans
Changes by Monty Evans : -- nosy: ShiftedBit priority: normal severity: normal status: open title: Base64 decoding gives incorrect outputs. type: behavior versions: Python 2.7, Python 3.5 ___ Python tracker ___