My own 12 points list
AdSR
adsr at poczta.onet.pl
Tue Aug 26 05:36:24 EDT 2003
pruebauno at latinmail.com (nnes) wrote...
> 8.) Eliminate `x` for repr()
I have a different idea for backticks use: something like `foo` in
Unix shells. It would behave more or less like popen("foo"), just a
bit smarter. You could either:
>>> print `ls`
and get the whole output of /bin/ls
- or -
>>> for line in `ls`
... print line
and read output of /bin/ls line by line.
I would add other behavior of string types, like % formatting, so you
could do:
>>> print `ls %s %s` % ('-a', '*foo*')
One potential problem is closing the underlying popen() object early
enough. And it's not really a big advantage over popen() either.
> 11.) Add a big decimal type (something like java) in the standard
> library. To be able to do bean counter type math easily. Are there so
> few python applications that deal with money?
I second that. We already have unlimited longs, but with floats we're
limited to platform-specific values.
> 12.) Int division: return float (for engineers) or big decimal (for
> bean counters)
Rational type also fits here to some extent. I wouldn't make it part
of the language though, but rather a standard library type,
rational(a, b=1).
AdSR
More information about the Python-list
mailing list