Prev: passing environment variable path to open command
Next: pyjsglade: GTK-glade-like UI builder for pyjamas
From: Aahz on 16 Jun 2010 22:37 In article <a228f6fb-a97c-4c06-9676-37940cf1957b(a)e34g2000pra.googlegroups.com>, alex23 <wuwei23(a)gmail.com> wrote: > >I've never used map/reduce outside of Python, this is where I first >encountered it. And I _have_ worked in organisations alongside new >Python coders. That it's easy enough to express both map & reduce in >Python code helped a lot with explaining them. And I am not particularly fond of map() and cordially loathe reduce(). Speaking as someone with more than twenty years of programming before encountering Python more than a decade ago. -- Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not start writing it." --Dijkstra
From: James Mills on 16 Jun 2010 22:50 On Thu, Jun 17, 2010 at 12:37 PM, Aahz <aahz(a)pythoncraft.com> wrote: > And I am not particularly fond of map() and cordially loathe reduce(). > Speaking as someone with more than twenty years of programming before > encountering Python more than a decade ago. "Loathe" is a particularly STRONG world. Are you sure you meant that ? What in particular do you _not_ enjoy about using map/reduce (and possibly other functional features of the Python programing language) ? --James Quantification of "experience" is meaningless. -- -- -- "Problems are solved by method"
From: Aahz on 16 Jun 2010 23:34 In article <mailman.1662.1276743037.32709.python-list(a)python.org>, James Mills <prologic(a)shortcircuit.net.au> wrote: >On Thu, Jun 17, 2010 at 12:37 PM, Aahz <aahz(a)pythoncraft.com> wrote: >> >> And I am not particularly fond of map() and cordially loathe reduce(). >> Speaking as someone with more than twenty years of programming before >> encountering Python more than a decade ago. > >"Loathe" is a particularly STRONG world. Are you sure you meant that ? Yes, I did mean to use it -- perhaps it is not entirely an accurate description of my emotional state, but I enjoy the shock effect in this circumstance. >What in particular do you _not_ enjoy about using map/reduce (and >possibly other functional features of the Python programing language) ? map() never felt particularly Pythonic, especially the way it works with None as the function combined with multiple arguments. I can't explain why I loathe reduce() -- it just doesn't fit my brain. -- Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/ "If you don't know what your program is supposed to do, you'd better not start writing it." --Dijkstra
From: James Mills on 17 Jun 2010 00:03 On Thu, Jun 17, 2010 at 1:34 PM, Aahz <aahz(a)pythoncraft.com> wrote: >>"Loathe" is a particularly STRONG world. Are you sure you meant that ? > > Yes, I did mean to use it -- perhaps it is not entirely an accurate > description of my emotional state, but I enjoy the shock effect in this > circumstance. > >>What in particular do you _not_ enjoy about using map/reduce (and >>possibly other functional features of the Python programing language) ? > > map() never felt particularly Pythonic, especially the way it works with > None as the function combined with multiple arguments. Â I can't explain > why I loathe reduce() -- it just doesn't fit my brain. No offense meant, but your "emotional state" has no weight on the usefulness and effectiveness (or not) of the functional features of python such as that provided by map() and reduce(). Further: What is "Pythonic" ? This is probably more of a style and personal taste that might vary from one programmer to another. I don't recall anywhere in the Python documentation or a Python document that says map/reduce is or isn't "pythonic" (whatever that means). Perhaps this list could do without posts pertaining to one's "emotional state". --James -- -- -- "Problems are solved by method"
From: Stephen Hansen on 17 Jun 2010 00:23
On 6/16/10 9:03 PM, James Mills wrote: > Further: What is "Pythonic" ? This is probably more of a style and > personal taste that might vary from one programmer to another. > I don't recall anywhere in the Python documentation or a Python > document that says map/reduce is or isn't "pythonic" (whatever that means). Pythonic is an ideal, a state of grace that code can achieve which finds the perfect balance between effectiveness, simplicity, and readability such that "elegant" is not quite a sufficient word. So a new one had to be made up. Its also an acquired taste, in that idiomatic Python takes some growing on you sometimes. Its not simply style and personal taste, though certainly there's something about style and taste involved. Its also about embracing Python's strengths, avoiding its weaknesses, and just a hint of flair or sometimes humor. Consider it an adjective meaning, "Of or related to idealized code according to the sometimes conflicting Zen of Python and its lesser known Doctrines of the Bots*. Belief in time travel is required for proper usage." As to your question: Of course the docs don't declare what is or is not pythonic. It is a somewhat shifty goal, as it changes as Python does (think back into the dark days before comprehensions, where map/reduce were a lot closer to the ideal). > Perhaps this list could do without posts pertaining to one's "emotional state". It could certainly do with a little less 'taking oneself too seriously' :) -- Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/ P.S. Python-list was more fun when Timbot was around, and <0.2-ly y'rs> ing all the time. And discussions between the bots were great. |