mirror of https://gerrit.osmocom.org/pysim
Vadim Yanitskiy
98f872bed1
Having lists and dictionaries as default argument values is a bad idea, because the same instance of list/dict will be used by all objects instantiated using such constructor: def appendItem(itemName, itemList=[]): itemList.append(itemName) return itemList print(appendItem('notebook')) print(appendItem('pencil')) print(appendItem('eraser')) Output: ['notebook'] ['notebook', 'pencil'] ['notebook', 'pencil', 'eraser'] Change-Id: I83d718ff9c3ff6aef47930f38d7f50424f9b880f |
||
---|---|---|
.. | ||
transport | ||
__init__.py | ||
card_handler.py | ||
cards.py | ||
commands.py | ||
exceptions.py | ||
filesystem.py | ||
ts_31_102.py | ||
ts_31_103.py | ||
ts_51_011.py | ||
ts_102_221.py | ||
utils.py |