python gripes survey
Andrew Dalke
adalke at mindspring.com
Sun Aug 24 01:12:12 EDT 2003
Ryan Lowe:
> i was actually more impressed with the union/intersection of lists and
> dictionaries. why the hell cant you join two dictionaries like you can two
> list? the len thing is a pretty minor issue in my mind.
Mostly because there isn't a good reason for what
a = {1: "a"} + {1: "b"}
should be. The most likely solution is
a = {1: "a"}
a.update({1:"b"})
However, there is something tricky even here. Watch this:
>>> d = {1: "a"}
>>> d.update({True: "b"})
>>> d
{1: 'b'}
>>>
The key came from the first dict, the value came from the
second.
BTW, an alternative to
a = d1.copy()
a.update(d2)
is
d = dict(d1.items() + d2.items())
> i guess my request was a little vague. im actually more interested in
> missing funtionality of the python language
Missing language functionality is not the same as missing Python
functionality. What you're asking is - why do other languages
exist? Python lacks native support for:
code blocks (like Smalltalk)
macros (like Lisp)
lazy evaluation (like .. Haskell? One of the functional languages)
rich N-dimensional operators (like APL)
predicate logic (like Prolog)
symbolic math manipulation (like Mathematica)
literate programming (like WEB -> Pascal/TeX)
aspect-oriented programming (like AspectJ)
stack nature (like Postscript (I had Forth here but didn't want a dup :))
color as part of syntax (like ColorForth)
programming by contract (like Eiffel)
fixed-point data types, as for money (like REXX)
control over the memory arenas use by an object (like C++)
direct access to memory, eg, as for I/O to periphials (like C)
support for high-performance multiprocessor computing (like Fortran90)
(some are available as external modules, like FixedPoint, but are
not native.)
There's easily more - just look at how many languages have
been invented over the last few decades.
Andrew
dalke at dalkescientific.com
More information about the Python-list
mailing list