Hacker News new | comments | show | ask | jobs | submit login

I'm curious why people consider DiP to be a bad book? I personally can't defend it since I haven't read it

Zed A. Shaw wrote a short critique: http://oppugn.us/posts/1272050135.html . One part of it is rather against Mark Pilgrims unwillingness to update it than against technical points.

"This book is so full of bad initial examples and difficult to follow instructions that it actually hurts Python to have it exist. When beginners stumble onto it they end up getting discouraged and go on to another language. I personally have had too many friends who are eager to learn programming find this festering dung pile before I could warn them and get turned off from programming." - Zed Shaw

I do not agree. In fact, the insanely cool examples are what makes this book worth reading. This book is not for beginners but for programmers who have experience in some other language and are curious to know why python might be a better choice for them as their next high level language.

in fact to reiterate have a look at the awesome fibonacci example showing power of generators [1]:

    def fibonacci(max):
        a, b = 0, 1       
        while a < max:
            yield a       
            a, b = b, a+b
To run the function do:

    >>> for n in fibonacci(1000): 
    ...     print n,              
    0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987
[1] http://diveintopython.org/dynamic_functions/stage6.html

That is, at best, a very high-level 'why', and unnecessarily hostile.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact