Re: Configuring an object via a dictionary

Liste des GroupesRevenir à cl python 
Sujet : Re: Configuring an object via a dictionary
De : toby (at) *nospam* tobiah.org (Tobiah)
Groupes : comp.lang.python
Date : 15. Mar 2024, 21:22:30
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <ut275n$2e6lj$1@dont-email.me>
References : 1 2
User-Agent : Mozilla Thunderbird
I should mention that I wanted to answer your question,
but I wouldn't actually do this.  I'd rather opt for
your self.config = config solution.  The config options
should have their own namespace.
I don't mind at all referencing foo.config['option'],
or you could make foo.config an object by itself so
you can do foo.config.option.  You'd fill it's attributes
in the same way I suggested for your main object.

Date Sujet#  Auteur
15 Mar 24 * Configuring an object via a dictionary15Loris Bennett
15 Mar 24 +- Re: Configuring an object via a dictionary1Mats Wichmann
15 Mar 24 +- Re: Configuring an object via a dictionary1Thomas Passin
15 Mar 24 +* Re: Configuring an object via a dictionary4Tobiah
15 Mar 24 i`* Re: Configuring an object via a dictionary3Tobiah
18 Mar 24 i `* Re: Configuring an object via a dictionary2Loris Bennett
19 Mar 24 i  `- Re: Configuring an object via a dictionary1Pokemon Chw
15 Mar 24 +- Re: Configuring an object via a dictionary1Grant Edwards
15 Mar 24 +- Re: Configuring an object via a dictionary1Thomas Passin
15 Mar 24 +- Re: Configuring an object via a dictionary (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
15 Mar 24 +- Re: Configuring an object via a dictionary12QdxY4RzWzUUiLuE
16 Mar 24 +- Re: Configuring an object via a dictionary1dn
16 Mar 24 +- Re: Configuring an object via a dictionary1Thomas Passin
16 Mar 24 +- Re: Configuring an object via a dictionary1<avi.e.gross
18 Mar 24 `- Re: Configuring an object via a dictionary1Anders Munch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal