Tim Peters added the comment:

If that's the actual code you're using, it has a bug:  the "if k2[1] is None" 
test is useless, since regardless of whether it's true or false, the next `if` 
suite overwrites `retval`.  You probably meant

    elif k1[1] ...
    ^^

instead of

    if k1[1] ...

Does that fix your problem?

If not, please augment the bug report with the _complete_ code you're actually 
using, a sample problematic input, the exact output you're expecting, and the 
exact output you're seeing instead.  We're not telepathic ;-)

----------
nosy: +tim.peters

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26751>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to