Breakdown of approaches to PEP318

phil hunt philh at invalid.email.address
Sun Mar 28 21:55:46 CEST 2004


On Sun, 28 Mar 2004 11:59:03 -0500, Sean Ross <sross at connectmail.carleton.ca> wrote:
>
># [11] current method
>def foo(self):
>       "doc string"
>       very
>       long
>       body
>       ....
>foo.spark_rule = "DOC:=HEAD BODY FOOT",
>foo.url="/cgi-bin/directory/directory")
>foo = publish_to_web(foo)

How about:


def foo(self):
   this_method. spark_rule = "DOC:=HEAD BODY FOOT"
   this_method.url="/cgi-bin/directory/directory"
   this_method = publish_to_web(this_method)
   " doc string "
   very
   long
   body


>Personally, I find all of this very off-putting. I find none of these
>proposals clean, clear, and/or readable, except perhaps [11] (which started
>the whole mess in the first place). 

I tend to agree with your sentiments.

>I tend to agree with the following,
>somewhat out of context, remark:
>
>"""
>If only we could learn from others' mistakes:
>
>Finally, in designing Self, we have learned one lesson by making mistakes:
>examples can persuade the designer to include additional features which
>later turn out to produce incomprehensible behavior in unforeseen
>circumstances. This might be called the language designer's trap.
>Minimalism, simplicity and consistency are better guides. They benefit every
>programmer, not just the ones who need advanced features. We suspect that
>many of today's object-oriented languages could profit by dropping features.
>
>Programming as an Experience: The Inspiration for Self
>"""

Indeed.

-- 
"It's easier to find people online who openly support the KKK than 
people who openly support the RIAA" -- comment on Wikipedia
(Email: zen19725 at zen dot co dot uk)  





More information about the Python-list mailing list