Stephen Hansen wrote:
Dotan Barak wrote:
... eval("my_number < 10", {"__builtins__":None}, {})
Hm, is this true, though? Is there anything subtle or dangerous possible
here? He's using eval-- so no statements, its only an expression. He's
passing in a 'global
Terry wrote:
Is there a simple way (the pythonic way) to flatten a list of list?
This is probably the shortest it can get:
sum(list_of_lists, [])
Kind Regards,
M.F.
--
http://mail.python.org/mailman/listinfo/python-list
Michael Ströder wrote:
> >>> timeit.Timer("unicode('äöüÄÖÜß','utf-8')").timeit(1000)
> 17.23644495010376
> >>> timeit.Timer("'äöüÄÖÜß'.decode('utf8')").timeit(1000)
> 72.087096929550171
>
> That is significant! So the winner is:
>
> unicode('äöüÄÖÜß','utf-8')
Which proves that benchmark r