Open ijstokes opened 9 years ago
As I said in FD, I would use a list comprehension to solve the issue... I feel it more pythonic, but this fix should work too...
:+1: to @damianavila's suggestion. return [s.encode('utf-8') for s in keymap.values()]
reads much more cleanly in Python than map
+ lambda
.
A listcomp is fine, of course. But since 'utf-8' is the default encoding, the map could also be simplified to:
return map(str.encode, keymap.values())
That version looks non-ugly to me, and in fact more readable than the listcomp.
Novartis discovered a problem with https://github.com/ContinuumIO/flask-ldap-login/blob/master/flask_ldap_login/__init__.py#L130 as noted here: https://continuumsupport.zendesk.com/agent/tickets/393
Their fix was to do:
instead.