← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1526140] [NEW] Should not use mutable default arguments in function definitions

 

Public bug reported:

Refer to: http://docs.python-guide.org/en/latest/writing/gotchas/. 
We should not use mutable default arguments in function definitions.

So we need remove the default arguments "[]" and "{}" in function
definitions. "[]" has been removed in patch:
https://review.openstack.org/#/c/256931/2.  We also need fix the code
incorrectly using "{}".

** Affects: horizon
     Importance: Undecided
     Assignee: Wang Bo (chestack)
         Status: New

** Changed in: horizon
     Assignee: (unassigned) => Wang Bo (chestack)

** Description changed:

- Refer to: http://docs.python-guide.org/en/latest/writing/gotchas/. we
- should not use mutable default arguments in function definitions.
+ Refer to: http://docs.python-guide.org/en/latest/writing/gotchas/. 
+ We should not use mutable default arguments in function definitions.
  
  So we need remove the default arguments "[]" and "{}" in function
  definitions. "[]" has been removed in patch:
- https://review.openstack.org/#/c/256931/2.  We need fix the left "{}"
- usage.
+ https://review.openstack.org/#/c/256931/2.  We also need fix the code
+ incorrectly using "{}".

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1526140

Title:
  Should not use mutable default arguments in function definitions

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Refer to: http://docs.python-guide.org/en/latest/writing/gotchas/. 
  We should not use mutable default arguments in function definitions.

  So we need remove the default arguments "[]" and "{}" in function
  definitions. "[]" has been removed in patch:
  https://review.openstack.org/#/c/256931/2.  We also need fix the code
  incorrectly using "{}".

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1526140/+subscriptions


Follow ups