Update patch set 4

Patch Set 4:

(2 comments)

Patch-set: 4
Label: Verified=0
This commit is contained in:
Gerrit User 22252 2016-06-15 17:54:23 +00:00 committed by Gerrit Code Review
parent fb9d71819b
commit 7efe1aeea3
1 changed files with 35 additions and 0 deletions

View File

@ -34,6 +34,23 @@
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "7aa08908_3bbfe761",
"filename": "giftwrap/settings.py",
"patchSetId": 4
},
"lineNbr": 34,
"author": {
"id": 22252
},
"writtenOn": "2016-06-15T17:54:23Z",
"side": 1,
"message": "I didn\u0027t catch this before but we should not use a mutable object as the default value of a kwarg, it will not act as you might expect. It should instead default to None, and we set the default value to a list if it\u0027s not None.\n\nSo: constraints\u003dNone here, below: \nif constraints is None:\n self.constraints \u003d []\nelse:\n self.constraints \u003d constraints\n\nOtherwise, multiple instances of the class can mutate the same list in memory - probably not what we want.\n\nhttp://docs.python-guide.org/en/latest/writing/gotchas/",
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "7aa08908_52029873",
@ -50,6 +67,24 @@
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "7aa08908_db0a2327",
"filename": "giftwrap/settings.py",
"patchSetId": 4
},
"lineNbr": 47,
"author": {
"id": 22252
},
"writtenOn": "2016-06-15T17:54:23Z",
"side": 1,
"message": "Seems it\u0027s time to enforce a type and to raise a TypeError.",
"parentUuid": "7aa08908_52029873",
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
}
]
}