Rewriting to Python 3

Mark Lawrence breamoreboy at yahoo.co.uk
Fri May 1 04:10:27 EDT 2015


On 01/05/2015 08:22, Cecil Westerhof wrote:
> On my system I have:
>      PARSER_RE_STR = '/(%s)=' % '|'.join(DN_LUT.keys() + DN_LUT.values())
> in:
>      /usr/lib/python3.4/site-packages/ndg/httpsclient/ssl_peer_verification.py
>
> In Python 3 that gives:
>      TypeError: unsupported operand type(s) for +: 'dict_keys' and 'dict_values'
>
> How should I rewrite this?
>

I'd run the entire package through the 2to3 tool that's part of the 
standard library, or uninstall that package and get an up to date 
version that actually supports Python 3.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list