mixed solution: unicase (unique allowed case) (was: Re:

Tim Rowe digitig at cix.co.uk
Sat Jun 3 19:49:00 EDT 2000


In article <Pine.GSO.4.10.10006031335390.17165-100000 at sundial>, 
moshez at math.huji.ac.il (Moshe Zadka) wrote:

> On 2 Jun 2000, Florian Weimer wrote:
> 
> > There's the convention to use "Foo" for classes and "foo" for
> > instances.  I don't think people want to give up that.
> 
> OK, I've heard this one once too many times. 
> 
> What's wrong with:
> 
> >>> class Foo:
> ...     pass
> ... 
> >>> aFoo = Foo()
> 
> Certainly much clearer?

Not, IMHO, when you get up to things like:

>>> class Foo:
...    pass
...
>>> def bar(foo = None,
...    # /lots/ of other optional parameters
...    ):
...    # some implementation
...
>>> baz = Foo()
>>> bar(foo = baz)

I consider it a /very/ useful idiom.



More information about the Python-list mailing list