magnum/magnum/objects
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
..
__init__.py Backend support for magnum service 2015-09-28 17:06:10 +00:00
base.py Performance: leverage dict comprehension in PEP-0274 2015-12-03 22:02:02 -05:00
bay.py Fixes for magnum objects doc string 2015-11-30 13:33:10 +08:00
baylock.py Remove coding:utf-8 2015-08-03 23:28:22 +08:00
baymodel.py Fixes for magnum objects doc string 2015-11-30 13:33:10 +08:00
certificate.py Add Certificate controller for TLS support. 2015-09-05 13:45:43 +00:00
container.py Fixes for magnum objects doc string 2015-11-30 13:33:10 +08:00
fields.py Introduce BayType that declares valid COEs 2015-09-28 15:55:40 -04:00
magnum_service.py Fixes for magnum objects doc string 2015-11-30 13:33:10 +08:00
node.py Fixes for magnum objects doc string 2015-11-30 13:33:10 +08:00
pod.py Objects from Bay - Pods 2015-12-02 12:13:57 -08:00
replicationcontroller.py Objects from Bay - Replication Controller 2015-11-16 12:06:28 -08:00
service.py Objects from Bay - Services 2015-11-30 11:20:39 -08:00
utils.py Replace oslo_utils.timeutils.isotime 2015-11-09 16:56:49 +08:00
x509keypair.py Fixes for magnum objects doc string 2015-11-30 13:33:10 +08:00