a +b ?

Stephen Hansen me+list/python at ixokai.io
Thu Jun 17 00:23:57 EDT 2010


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100616/a1372860/attachment.sig>


More information about the Python-list mailing list