Re: dictionary comprehensions with Python 2.4/2.5

2012-08-07 Thread Iryna Feuerstein
Not back to 2.5, but they're not that important anyway. Just use: d = dict((k, v) for k,v in ... ) Thank you very much! It is the perfect solution for me. Regards, Iryna. -- http://mail.python.org/mailman/listinfo/python-list

Re: dictionary comprehensions with Python 2.4/2.5

2012-08-07 Thread Paul Rubin
Iryna Feuerstein writes: > code. The dictionary comprehensions were added to Python in version > 2.7 at first time. Is it possible to make it compatible with Python > 2.5 anyway? Perhaps by using the __future__ module? Not back to 2.5, but they're not that important anyway. Just use: d = dict

dictionary comprehensions with Python 2.4/2.5

2012-08-06 Thread Iryna Feuerstein
Hello, for the program developed and maintained by our company the compatibility with Python 2.5 is desired. I'm developing with Python 2.7, though I would like to use dictionary comprehensions in my code. The dictionary comprehensions were added to Python in version 2.7 at first time. Is it