Language fluency (was Re: BASIC vs Python)

Andrew Dalke dalke at dalkescientific.com
Mon Dec 20 09:30:35 CET 2004


Keith Dart wrote:
> Are you saying that if you write, 
> full time, code for "production", that fluency will decrease?

To add to Aahz's response, there are some corners of Python
I learned once and decided shouldn't be in production code
because it would be too hard to maintain.  'reduce' is one of
them.  Another might be multiple 'for' clauses in a comprehension

 a = [x*y for x in range(10) for y in range(10)]

because it's used so rarely that someone looking at it
wouldn't know which of the 3 likely values is actually created.
Is it:
  a == [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]
  a == [[0, 0, 0, ...], [0, 1, 2, 3, ...], [0, 2, 4, 6, ...], ...]
or
  a == [0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,0,2,4,6,8,...]
I had to test to figure out which was the correct answer.

There are a few others like 'execfile' and 'compile' that
I don't have reason to use in my production code.  I knew them
once but have forgotten how to use in "utter fluency".

				Andrew
				dalke at dalkescientific.com




More information about the Python-list mailing list