On Jun 23, 4:43 pm, "Rhodri James" <rho...@wildebst.demon.co.uk> wrote:
> > And how exactly does your example express itself in a more > > "syntactically-correct" "linear-flow" than the two code snippets i > > provided earlier, hmmm? > > You did rather carefully pick an example where Python's syntax flow the > other way round "rather carefully picked" you say? As if built-in functions are hardly ever used? No I think *your* statement was "rather carefully picked" to try and discredit me. Sorry my friend that might work on the less astute readers round here, but it has no effect on me ;-) > and then present all the least Pythonic paraphrases of the > Ruby functional approach. What? Did you just use the words "Pythonic" and "Ruby" in the same sentence all the while keeping a strait face? Ruby's naturally linear phrasing is one thing i like about the language (and map of course), short of those two niceties i prefer Python. Would you like to present another way of achieving the same code that makes Python look better, i would love to see it. Here is an even more interesting example of "Ruby linear-flow" verses "Python lisp-style- nesting"... RUBY: ["three","one","two"].map{|x| x.capitalize}.sort.join(',') PYTHON ','.join(sorted(map(lambda x:x.title(), ["three", "one", "two"]))) I do the Python code all the time without thinking twice about it. But to a noob i'll bet Ruby is more decipherable in these cases. It's ironic that Python was created by a westerner and we read it from right to left, and Ruby was created by a easterner and we read it left to right. Go figure? ;-) -- http://mail.python.org/mailman/listinfo/python-list