d988d14801
PEP-0274 introduced dict comprehensions [1], these are benefits: The dictionary constructor approach has two distinct disadvantages from the proposed syntax though. First, it isn't as legible as a dict comprehension. Second, it forces the programmer to create an in-core list object first, which could be expensive. Keystone dropped python 2.6 support in Kilo, we can leaverage this now. There is deep dive about PEP-0274[2] and basic tests about performance[3]. Note: This commit doesn't handle dict constructor with kwargs. This commit also adds a hacking rule. [1]http://legacy.python.org/dev/peps/pep-0274/ [2]http://doughellmann.com/2012/11/12/the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2.html [3]http://paste.openstack.org/show/154798 Change-Id: Ie74719d0c969fa7819c243d5b162df6656c1e136 |
||
---|---|---|
.. | ||
backends | ||
migrate_repo | ||
__init__.py | ||
controllers.py | ||
core.py | ||
routers.py | ||
schema.py |