On Fri, 24 Sep 2010 01:45:29 am you wrote:
> > Oh, and (4)... in Python circles, it's traditional but not
> > compulsory to use metasyntactic variables named after Monty Python
> > sketches rather than foo and bar. So spam, ham, eggs, parrot (dead
> > or otherwise), names of cheeses, aardvark..., a
> Oh, and (4)... in Python circles, it's traditional but not compulsory
> to use metasyntactic variables named after Monty Python sketches
> rather than foo and bar. So spam, ham, eggs, parrot (dead or
> otherwise), names of cheeses, aardvark..., although there is no
> standard order.
Hm, some
On Thu, 23 Sep 2010 09:21:27 am Pete wrote:
> > (3) There's no need to keep the instances floating around as
> > independent names, unless you need direct access to them.
> >
> > Putting these together, we get:
> >
> > dispatch_table = { 'foo': foo().do, 'bar': bar().do }
[...]
> I see. And are th
On 2010-09-22, at 5:50 PM, Steven D'Aprano wrote:
> On Thu, 23 Sep 2010 06:07:21 am Pete wrote:
>> For a plugin mechanism, I'm populating a dict with calls to the
>> implemented plugins.
> [...]
>> Now I get that I need to instantiate foo and bar first before I can
>> refer to them in the dict.
>
On Thu, 23 Sep 2010 06:07:21 am Pete wrote:
> For a plugin mechanism, I'm populating a dict with calls to the
> implemented plugins.
[...]
> Now I get that I need to instantiate foo and bar first before I can
> refer to them in the dict.
>
> so something like
>
> foo_instance = foo()
> bar_instance