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

Neil Hodgson neilh at scintilla.org
Sat Jun 3 21:05:37 EDT 2000


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

   Wouldn't 'foo' be better used to describe its role rather than its type.

   bar(output = baz)

   Neil






More information about the Python-list mailing list