removed mutable as parameters

This commit is contained in:
Andreas Preikschat 2013-02-04 22:27:50 +01:00
parent 3df730db09
commit a72b4283bf
3 changed files with 7 additions and 3 deletions

View File

@ -67,7 +67,7 @@ def add_welcome_page(parent, image):
parent.addPage(parent.welcomePage)
def create_button_box(dialog, name, standard_buttons, custom_buttons=[]):
def create_button_box(dialog, name, standard_buttons, custom_buttons=None):
"""
Creates a QDialogButtonBox with the given buttons. The ``accepted()`` and
``rejected()`` signals of the button box are connected with the dialogs
@ -88,6 +88,8 @@ def create_button_box(dialog, name, standard_buttons, custom_buttons=[]):
QtGui.QAbstractButton it is added with QDialogButtonBox.ActionRole.
Otherwhise the item has to be a tuple of a button and a ButtonRole.
"""
if custom_buttons is None:
custom_buttons = []
buttons = QtGui.QDialogButtonBox.NoButton
if u'ok' in standard_buttons:
buttons |= QtGui.QDialogButtonBox.Ok

View File

@ -138,7 +138,9 @@ class HttpResponse(object):
'Content-Type': 'text/html; charset="utf-8"\r\n'
}
def __init__(self, content='', headers={}, code=None):
def __init__(self, content='', headers=None, code=None):
if headers is None:
headers = {}
self.content = content
for key, value in headers.iteritems():
self.headers[key] = value

View File

@ -121,7 +121,7 @@ class SundayPlusImport(SongImport):
end = data.find(')', i) + 1
value = data[i:end]
# If we are in the main group.
if cell == False:
if not cell:
if name == 'title':
self.title = self.decode(self.unescape(value))
elif name == 'Author':