Sujet : Re: Configuring an object via a dictionary
De : mats (at) *nospam* wichmann.us (Mats Wichmann)
Groupes : comp.lang.pythonDate : 15. Mar 2024, 20:35:26
Autres entêtes
Message-ID : <mailman.93.1710527741.3452.python-list@python.org>
References : 1 2
User-Agent : Mozilla Thunderbird
On 3/15/24 03:30, Loris Bennett via Python-list wrote:
Hi,
I am initialising an object via the following:
self.source_name = config['source_name']
config.get('source_name', default_if_not_defined) is a common technique...