magnum/magnum
houming-wang 98875345c2 Performance: leverage dict comprehension in PEP-0274
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of length-2 sequences, these are benefits copied
from [1]:
  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.
Magnum does not support python 2.6, we can leverage this.
There is deep dive about PEP-0274[2] and basic tests about
performance[3].
Note: This commit doesn't handle dict constructor with kwagrs.
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/480757/

Change-Id: I61992fa428d6760449afe3754b02506336e8b421
2015-12-03 22:02:02 -05:00
..
api Performance: leverage dict comprehension in PEP-0274 2015-12-03 22:02:02 -05:00
cmd Performance: leverage dict comprehension in PEP-0274 2015-12-03 22:02:02 -05:00
common Merge "Decoupling magnum service from periodic task" 2015-12-03 01:35:00 +00:00
conductor Objects from Bay - Pods 2015-12-02 12:13:57 -08:00
db Fix typo in db api doc string 2015-11-30 13:56:26 +08:00
hacking Performance: leverage dict comprehension in PEP-0274 2015-12-03 22:02:02 -05:00
locale Imported Translations from Zanata 2015-11-04 06:03:51 +00:00
objects Performance: leverage dict comprehension in PEP-0274 2015-12-03 22:02:02 -05:00
openstack Remove unused oslo-incubator modules 2015-07-22 23:46:12 +03:00
public/css Incorporate feedback from the Initial commit review 2014-11-18 14:25:08 +00:00
service Decoupling magnum service from periodic task 2015-11-30 18:52:48 +00:00
servicegroup Decoupling magnum service from periodic task 2015-11-30 18:52:48 +00:00
templates Swarm: Split swarm.yaml to swarmcluster.yaml and swarmmaster.yaml 2015-11-27 14:06:11 +08:00
tests Performance: leverage dict comprehension in PEP-0274 2015-12-03 22:02:02 -05:00
MANIFEST.in Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
__init__.py Initial commit from github (squashed) 2014-11-18 09:23:37 -05:00
i18n.py Setup for translation 2015-05-24 03:13:55 +00:00
opts.py Add Magnum config for default network driver per COE 2015-11-13 03:22:08 +00:00
version.py Remove coding:utf-8 2015-08-03 23:28:22 +08:00