diff options
Diffstat (limited to 'Doc/howto/doanddont.rst')
-rw-r--r-- | Doc/howto/doanddont.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/howto/doanddont.rst b/Doc/howto/doanddont.rst index a3a91ed..a56fb8c 100644 --- a/Doc/howto/doanddont.rst +++ b/Doc/howto/doanddont.rst @@ -1,5 +1,5 @@ ************************************ - Idioms and Anti-Idioms in Python + Idioms and Anti-Idioms in Python ************************************ :Author: Moshe Zadka @@ -127,7 +127,7 @@ Bad example:: # bar.py from foo import a if something(): - a = 2 # danger: foo.a != a + a = 2 # danger: foo.a != a Good example:: @@ -303,6 +303,6 @@ It is usually much better to use the implicit continuation inside parenthesis: This version is bulletproof:: - value = (foo.bar()['first'][0]*baz.quux(1, 2)[5:9] + value = (foo.bar()['first'][0]*baz.quux(1, 2)[5:9] + calculate_number(10, 20)*forbulate(500, 360)) |