On 07/24/2010 02:45 PM, francogrex wrote: > Hi, I'm not a Python programmer but I'm > interested in it and I found this table from > Norvig that dates for some years (I re-posted > it temporarily on my site below to take it out > of context a little). I'm not interested in > any comparisons only in the Python features ( > last column), can someone whether the > information in the Python features column is > still correct today. Thanks
Mostly all true, with a few changes and inaccuracies. And a definite bias towards the LISP. (and the author didn't even specify a dialect on lisp. My my...) > "Support heterogeneous lists" ==> "Yes (array)" This is nonsense, and has always been. Python lists (not arrays) have always been heterogeneous. They store objects and don't care about the type. Python arrays (from the array module) are homogeneous, and limited to storing numerical data. Quite a different beast. > "Number of implementations" ==> [...]branches[...] I wouldn't cann Jython a branch. You could say that there are currently two major branches of the Python language, and the CPython interpreter: Python 2.x and Python 3.x. There are a number of implementations of Python, the big names being CPython, Jython, IronPython, and PyPy > Data types: Python 2's int and long (there called integer and bignum) are now (Python 3.x) a single type. Again, the author of the table reveals that he is is a lisp programmer only passingly acquainted with Python: Python lists are *not* arrays. They are (linked) lists. They're not identical to lisp (cons'd) lists, but they are, nonetheless, lists, not arrays. > Exceptions: string exceptions, as demonstrated in the table, are gone in Python 3. > "no other control structures" now that's a bit hard on Python. Technically true perhaps, but the author could have mentioned generators somewhere. > function application apply is gone in Python 3.x -- use the fn(*args) syntax instead. Also, execfile("file.py") is NOT identical to import file. > other high-order functions Check out itertools and functools. (std library) > "close over writable var" Can be done in Python 3.x with the nonlocal keyword. Also, to a point, objects have always supported the same behaviour, with a twist. > FEATURES > "quotation" The way this is presented doesn't really fit with Python. Very lisp way to look at quotation. > "operations on arrays" ahem. -- http://mail.python.org/mailman/listinfo/python-list