yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #43471
[Bug 1525903] Re: should not use mutable default arguments
Reviewed: https://review.openstack.org/256931
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=db8e206bee856fe838b381e5dc8eb47706f50b5b
Submitter: Jenkins
Branch: master
commit db8e206bee856fe838b381e5dc8eb47706f50b5b
Author: Javeme <zhangmei.li@xxxxxxxxxxxx>
Date: Sat Dec 12 18:28:58 2015 +0800
remove the default arguments "[]"
remove the default arguments "[]" when the function is defined.
ref: http://docs.python-guide.org/en/latest/writing/gotchas/
Closes-Bug: #1525903
Change-Id: I241f22fe10e535bb50f7ce27fac09d6448fd2bb2
** Changed in: horizon
Status: In Progress => Fix Released
--
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/1525903
Title:
should not use mutable default arguments
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
We should not use mutable default arguments in function definitions
due to the "Common Gotchas"[1].
So, we must remove the default arguments "[]" when the function is defined, such as this function:
https://github.com/openstack/horizon/blob/master/openstack_dashboard/utils/metering.py#L178
[1]: http://docs.python-guide.org/en/latest/writing/gotchas/
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1525903/+subscriptions
References