syntax philosophy

Tuang tuanglen at hotmail.com
Tue Nov 18 15:32:44 EST 2003


bokr at oz.net (Bengt Richter) wrote 
> 
> IMO Python is a very good Swiss Army Knife. If you think you have a pattern
> that you will want to re-use, then it is pretty easy to make something to
> hide the stuff you want as default, and leave out some unnecessaries. E.g.,
> if you want histograms, it's easy to make a histogram class that will
> take a word sequence and give you a histogram object that will do what you want,
> and that you can add to as your requirements change. E.g.,

[...lots of useful stuff for me to copy for future reference...]

Thanks!

I appreciate your examples of how easy it is to create abstractions
somewhat above the level of the built-ins for future reuse. It can be
done in Perl too, of course, but it appears to be so much more
convenient in Python that I think I actually will start assembling a
bunch of prebuilt tools of this sort to put in a standard module of my
own (my personal toolbox). As I said, it can be done in Perl, too, but
it's just difficult enough that I never quite bothered to do it. I
definitely like this aspect of Python.




More information about the Python-list mailing list