For sequences, (strings, lists, tuples), use the fact that empty sequences are false

Bug #1156473 reported by shu, xinxin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
shu, xinxin

Bug Description

For sequences, (strings, lists, tuples), use the fact that empty sequences are false(PEP 8 Programming Recommendations)

Yes: if not seq:
     if seq:

No: if len(seq)
    if not len(seq)

Changed in quantum:
importance: Undecided → Wishlist
tags: added: low-hanging-fruit
shu, xinxin (xinxin-shu)
Changed in quantum:
assignee: nobody → shu, xinxin (xinxin-shu)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/24958

Changed in quantum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/24958
Committed: http://github.com/openstack/quantum/commit/b1067c94c53e22cc9f8400cf7b2049e35d06877b
Submitter: Jenkins
Branch: master

commit b1067c94c53e22cc9f8400cf7b2049e35d06877b
Author: shu,xinxin <email address hidden>
Date: Thu Mar 21 18:48:00 2013 +0800

    use the fact that empty sequences are false

    fixed bug #1156473

    Change-Id: I43470eb884107111cbea958868f4cf8241c8d6e6

Changed in quantum:
status: In Progress → Fix Committed
Changed in quantum:
milestone: none → havana-1
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-1 → 2013.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.