Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9178fdf

Browse files
author
Kenneth Reitz
committed
Merge pull request realpython#243 from lambdadi/master
Suggest improved introduction to Style/#Idioms
2 parents d950093 + 0e989d7 commit 9178fdf

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/writing/style.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,16 @@ is a probable indication that such a refactoring is needed.
251251
Idioms
252252
------
253253

254-
Idiomatic Python code is often referred to as being *Pythonic*.
254+
A programming Idiom, put simply, is _a way_ to write code. The notion of programming Idioms
255+
is discussed amply at `c2 <http://c2.com/cgi/wiki?ProgrammingIdiom>` and at `Stack Overflow <http://stackoverflow.com/questions/302459/what-is-a-programming-idiom>`.
256+
257+
Idiomatic Python code is often referred to as being *Pythonic*.
258+
259+
Although there usually is one-- and preferably only one --obvious way to do it;
260+
_the_ way to write idiomatic Python code can be non-obvious to Python beginners. So,
261+
good idioms must be consciously acquired.
262+
263+
Some common Python idioms follow:
255264

256265
.. _unpacking-ref:
257266

0 commit comments

Comments
 (0)