Python's annoyance.

Jeremy Bowers jerf at
Thu Nov 25 06:54:20 CET 2004

On Wed, 24 Nov 2004 10:47:11 -0800, caroundw5h wrote:
> Serioulsy, one of python's main selling points is its elegant syntax, non
> perl like, non C like. If it can't live up to it. I guess i might as well
> use perl or ruby or server side javascript.

There's a rather large difference between

@dynamic_dispatch('add', int)
@author("Steven Q. Dude")
@whack_a_hacka_ding_dong(with_fruit=True, sledgehammer=5)
@register(zodb & mysql_storage)
def increment(i):
	return i + 1


def advanceCounter(index):
	objToAdvance = objStorageArray[index]
	obj.prep(prepType = ADVANCE)
	except IOError:
	return obj

One guess which is the more common case.

I can make any language look bad by focusing on the nasty cases. I mean,
why not complain about

p=lambda n,s=2,np=lambda s,f:reduce(lambda x,y:x and y,map(lambda
  x,y:x%y,[s+1]*(s/2),range(2,s/2+2)))and s+1or f(s+1,f


Obviously, any language that allows that isn't clean.

You have to take the gestalt of real code written in the language, not
contrive cases focusing on the worst part of the language. Python's near
the top of the heap. Javascript would fare better if so many inexperienced
programmers weren't bashing away in it, and if so many extant programs in
it weren't bogged down by browser checking code brought on by wildly
divergent DOMs. 

If you insist on using such faulty metrics, though, hie thee hence to
Perl, that epitome of elegant syntax and more power to you. I leave you
with this closing benediction in honor of the might syntactical
cleanliness of Perl:



More information about the Python-list mailing list