deb-sahara/HACKING.rst
ChangBo Guo(gcb) 4dc5dfdada Leverage dict comprehension in PEP-0274
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of key-pairs[1], these are twobenefits:
  First, it makes the code look neater.
  Second, it gains a micro-optimization.

sahara dropped python 2.6 support in Kilo, we can leverage this now.

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/

Closes-Bug: #1430786
Change-Id: I507f2c520ddab1ae3d8487bf7aea497306eb6eb2
2015-04-02 01:51:41 +00:00

987 B

Sahara Style Commandments

Sahara Specific Commandments

Commit Messages

Using a common format for commit messages will help keep our git history readable. Follow these guidelines:

  • [S365] First, provide a brief summary of 50 characters or less. Summaries of greater then 72 characters will be rejected by the gate.
  • [S364] The first line of the commit message should provide an accurate description of the change, not just a reference to a bug or blueprint.

Imports

  • [S366, S367] Organize your imports according to the Import order

Dictionaries/Lists