why?

Alex Martelli Alex.Martelli at think3.com
Tue Dec 28 05:26:55 EST 1999


Eugene writes:

> On Tue, 28 Dec 1999 03:40:32 GMT, "ekko" <kgandco at home.com> wrote:
> 
> >I don't know that much about Python and I have some questions. Why would
> I
> >want to learn Python. What uses does it have? What kind of programs can I
> >make with Python? Thanks.
> 
	[snipped: Eugene's highly condivisible paean about Python's uses]

> (I'll let the others talk about features, comparisons to other
> languages, syntactical joys, and the other 99 billion uses I didn't
> 
One aspect that has little to do with any of the foregoing (or most
other uses), which was the "straw that broke the Camel's back" in
my specific case (pun intentional), are Python's "long integers" --
unlimited-magnitude integers (well, limited by your machine's
memory, of course:-).

I wanted to rewrite certain combinatorial computations, that I
had originally and experimentally encoded in a weird mixture
of C++ and Perl, and fishing around for "what would the best
packaging be for these".  And suddenly it dawned -- Python
had built-in unlimited integers!  All the factorials you want,
without any need for extensions, libraries, add-ons, etc --
just loop and compute (and memoize, for speed), and exact
accounting of combinations and permutations falls in your
lap, just like that.  That provided the extra motivation to make
me look deeper into the language -- where I soon found out
it could easily replace all the uses I had ever found for Perl,
Tcl, VBscript, etc, and then some.

Now, all I need is to convince a certain Tcl "enthusiast" [not
really all that enthusiastic, but...] that Python's use of whitespace
is not disgusting, and get him to recode his beautiful library
of bridge-oriented C-coded Tcl-extensions into Python-friendly 
terms (or else, fork his published sources and do the recoding 
myself, but that sounds nasty...), and I would be all set... 


Alex





More information about the Python-list mailing list