change dict unpack to ChainMap
This commit is contained in:
parent
6f8985d3f4
commit
c26f438bfb
|
@ -1,6 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os, re, shutil, pygame, sys
|
||||
import os, re, shutil, pygame, sys, collections
|
||||
|
||||
from .GameChild import *
|
||||
from .Sprite import *
|
||||
|
@ -869,7 +869,7 @@ class AudioPanelButton(Sprite):
|
|||
pos.move(-container.location.left, -container.location.top)
|
||||
if self.collide(pos):
|
||||
if self.pass_mods:
|
||||
kwargs = dict(**self.callback_kwargs, **{"mods": pygame.key.get_mods()})
|
||||
kwargs = collections.ChainMap(self.callback_kwargs, {"mods": pygame.key.get_mods()})
|
||||
else:
|
||||
kwargs = self.callback_kwargs
|
||||
self.callback(**kwargs)
|
||||
|
|
Loading…
Reference in New Issue