Idea about method parameters

Markus Schaber markus at schabi.de
Tue Sep 25 12:15:08 EDT 2001


[superseded because I had missed a paragraph]

Hello,

sebastien <s.keim at laposte.net> schrub:

> I have suggested at:
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/68424
> a few class that try to answer your problem.
> 
> In fact it do a litle more since it allow you to manage your
> parameters by groups.

This looks good, and I think it is gread work.

But a "foreign" reader must know the meaning of the helper classes to 
understand the meaning of the code.

But it doesn't cover parameters without default values (who have to be 
given). Those are allowed, but not covered by your mechanism. That at 
least is what I read out of the page, but maybe I simply did not get it.

Another point is that you have to define the default values as class 
attributes. This is a rather obfuscated way of implicitly doing what 
should be explicit.

I also had the problem that my browser killed the formatting of the 
code examples on this site, but this may be the fault of Opera. Does 
anyone know whether the use of <span> inside of <pre>. Well, at least 
validator.w3c.org and www.cast.org/bobby spot out lots of HTML4 errors 
so I still can believe Opera is correct here :-)

markus
-- 
"The strength of the Constitution lies entirely in the determination of 
each citizen to defend it. Only if every single citizen feels duty 
bound to do his share in this defense are the constitutional rights 
secure." -- Albert Einstein



More information about the Python-list mailing list