Dive Into Python -- Still Being Updated?

Discussion in 'Python' started by hanumizzle@gmail.com, Jul 22, 2006.

  1. Guest

    I find Dive Into Python generally an excellent text, and I am not
    surprised to see people recommending it...but I have noticed a few
    errors already:

    http://diveintopython.org/getting_to_know_python/indenting_code.html

    The function called fib (presumably short for Fibonacci) appears to
    produce factorials. Anyway, 'fib' should really be called 'hem'. :)

    http://diveintopython.org/native_data_types/tuples.html#odbchelper.tuplemethods

    I think tuples have methods, na?

    hanumizzle@debian:~$ python
    Python 2.4.3 (#1, Jun 20 2006, 11:52:59)
    [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> print "\n".join(dir(tuple))

    __add__
    __class__
    __contains__
    __delattr__
    __doc__
    __eq__
    __ge__
    __getattribute__
    __getitem__
    __getnewargs__
    __getslice__
    __gt__
    __hash__
    __init__
    __iter__
    __le__
    __len__
    __lt__
    __mul__
    __ne__
    __new__
    __reduce__
    __reduce_ex__
    __repr__
    __rmul__
    __setattr__
    __str__
    >>>
     
    , Jul 22, 2006
    #1
    1. Advertising

  2. Il 22 Jul 2006 15:48:36 -0700, ha scritto:

    > http://diveintopython.org/getting_to_know_python/indenting_code.html
    >
    > The function called fib (presumably short for Fibonacci) appears to
    > produce factorials. Anyway, 'fib' should really be called 'hem'. :)


    I think this is just a bad name for the function... it's not stated
    anywhere that it should return a Fibonacci sequence.


    >
    > http://diveintopython.org/native_data_types/tuples.html#odbchelper.tuplemethods
    >
    > I think tuples have methods, na?


    Well... of course they have some *special* methods, (any python object has)
    but they have no method of their own. I think this is pretty clear, it's
    employed to emphasize the contrast with the list object.

    BTW, you can see last update is 20 May 2004; it's right on the homepage.

    --
    Alan Franzoni <>
    -
    Togli .xyz dalla mia email per contattarmi.
    Rremove .xyz from my address in order to contact me.
    -
    GPG Key Fingerprint:
    5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E
    -
    Blog: http://laterradeglieroi.verdiperronchi.com
     
    Alan Franzoni, Jul 24, 2006
    #2
    1. Advertising

  3. Guest

    Alan Franzoni wrote:
    > Il 22 Jul 2006 15:48:36 -0700, ha scritto:
    >
    > > http://diveintopython.org/getting_to_know_python/indenting_code.html
    > >
    > > The function called fib (presumably short for Fibonacci) appears to
    > > produce factorials. Anyway, 'fib' should really be called 'hem'. :)

    >
    > I think this is just a bad name for the function... it's not stated
    > anywhere that it should return a Fibonacci sequence.


    Well, yeah, my point. It's misleading. He was on the right track (it is
    a sequence), but he goofed a little. In general, Mark Pilgrim's
    material is pretty damn good.

    > > http://diveintopython.org/native_data_types/tuples.html#odbchelper.tuplemethods
    > >
    > > I think tuples have methods, na?

    >
    > Well... of course they have some *special* methods, (any python object has)
    > but they have no method of their own. I think this is pretty clear, it's
    > employed to emphasize the contrast with the list object.


    I'm coming from Perl/Ruby, so maybe I don't grasp the concept of
    'special' methods yet.

    > BTW, you can see last update is 20 May 2004; it's right on the homepage.


    I know :( ...it is open content (GFDL), so I suppose I could pick it
    up...maybe later :)
     
    , Jul 26, 2006
    #3
  4. cga2000 Guest

    On Tue, Jul 25, 2006 at 11:32:23PM EDT, wrote:
    >
    > Alan Franzoni wrote:
    > > Il 22 Jul 2006 15:48:36 -0700, ha scritto:
    > >
    > > > http://diveintopython.org/getting_to_know_python/indenting_code.html
    > > >
    > > > The function called fib (presumably short for Fibonacci) appears to
    > > > produce factorials. Anyway, 'fib' should really be called 'hem'. :)

    > >
    > > I think this is just a bad name for the function... it's not stated
    > > anywhere that it should return a Fibonacci sequence.

    >
    > Well, yeah, my point. It's misleading.


    ... a "fib".. as in "telling fibs.."

    so the function lies .. therefore it does not return a Fibonacci
    sequence..

    ???
     
    cga2000, Jul 26, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Luis P. Mendes

    Dive into Python java equivalent

    Luis P. Mendes, May 13, 2005, in forum: Python
    Replies:
    0
    Views:
    322
    Luis P. Mendes
    May 13, 2005
  2. Franz Mueller
    Replies:
    6
    Views:
    539
    Anders Eriksson
    Nov 29, 2005
  3. Franz Mueller

    Dive into Python PDF

    Franz Mueller, Nov 30, 2005, in forum: Python
    Replies:
    2
    Views:
    524
    Paul Rubin
    Nov 30, 2005
  4. Ben Edwards (lists)

    Exercises for dive into python

    Ben Edwards (lists), Jul 24, 2006, in forum: Python
    Replies:
    0
    Views:
    299
    Ben Edwards (lists)
    Jul 24, 2006
  5. Ben Edwards (lists)

    Re: Exercises for dive into python

    Ben Edwards (lists), Jul 24, 2006, in forum: Python
    Replies:
    1
    Views:
    382
    Gerard Flanagan
    Jul 24, 2006
Loading...

Share This Page