Cut down on writing repetitive code

Jim Meier fatjim at home.com
Wed Jun 16 05:26:10 EDT 1999


Skip Montanaro wrote:

> Tim Gallati wrote:
>
> > If you do a lot of repetitive typing, check out Perfect Keyboard Lite.
> > I use it everyday and consider it my most useful program.
>
> Gee, I thought the usual OO way to cut down on repetitive typing was to
> abstract common code into base classes.  I guess the original OO folks
> (Simula? Smalltalk?) got it all wrong 20- to 30-odd years ago.  They
> should have invested in Mavis whats-her-name instead!

:) ROTFLMAO - again, and again, and again, .. oh, wait..
class again:
    def __init__(self, num, arg):
        tmp=arg[:]
        tmp=tmp+", and "
        self.val=tmp*(num-1)
        self.val=self.val+arg
    def __str(self):
        return self.val

print again(900, "again")

:)

>
> No disclaimers in the original post.  I guess it was an off-charter
> advertisement.  Another company hits my bit bucket.

I wouldn't be _THAT_ hard on them. True, they didn't mention that they were
actually the company in question, and for that they certainly deserve a
smack upside the head. But they certainly posted a relevant pointer to
something that may help a lot of people associated with this newsgroup. They
may not be perfect, but they are certainly on my "good usenet advertisers"
list for not randomly spamming, for spelling everything properly, for being
short and direct, and for being reasonably on-topic.

Better this than the recent porn postings!!

>
> --
> Skip Montanaro  | http://www.mojam.com/
> skip at mojam.com  | http://www.musi-cal.com/~skip/
> 518-372-5583

-Jim.





More information about the Python-list mailing list