mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
python3: fix incorrect use of merging two dictionaries
In python2, this was inefficient, because it allocated *three* lists of tuples, before finally generating a dict based on them. In python3, it fails because you cannot combine the dict_items() type. Moreover, retval was always a function-local dictionary used purely for returning the value, so dict1.update(dict2) will always yield the correct result, and we don't even need to create a copy to avoid mutating the original dictionary.
This commit is contained in:
parent
dc77754c1a
commit
a2c558d864
1 changed files with 2 additions and 1 deletions
|
|
@ -491,7 +491,8 @@ class AddNewDialog(SizePersistedDialog):
|
|||
retval['updatemeta']=True
|
||||
retval['collision']=ADDNEW
|
||||
|
||||
return dict(retval.items() + self.extraoptions.items() )
|
||||
retval.update(self.extraoptions)
|
||||
return retval
|
||||
|
||||
def get_urlstext(self):
|
||||
return unicode(self.url.toPlainText())
|
||||
|
|
|
|||
Loading…
Reference in a new issue