Simpler syntax

This commit is contained in:
Gouvernathor 2024-04-03 01:03:54 +02:00
parent ae5ff121d9
commit 00eda2aae5

View File

@ -113,7 +113,7 @@ init -1 python:
# Use a tuple/list to specify the order of layers in a dict
self.layers_order = layers
self.layers = dict([(k, None) for k in layers])
self.layers = dict.fromkeys(layers)
self.update_callback = update_callback
@ -124,8 +124,7 @@ init -1 python:
if actions:
# Override class variable for this instance
self.actions = dict(Chibi.actions)
self.actions.update(actions)
self.actions = Chibi.actions | actions
self.zorder = zorder
self.speed = speed # pixels/sec