By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,545 Members | 1,391 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,545 IT Pros & Developers. It's quick & easy.

Dive Into Python -- Still Being Updated?

P: n/a
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...ting_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_dat...r.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 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Il 22 Jul 2006 15:48:36 -0700, ha********@gmail.com ha scritto:
http://diveintopython.org/getting_to...ting_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_dat...r.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 <al***************@gmail.com>
-
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
Jul 24 '06 #2

P: n/a

Alan Franzoni wrote:
Il 22 Jul 2006 15:48:36 -0700, ha********@gmail.com ha scritto:
http://diveintopython.org/getting_to...ting_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_dat...r.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 '06 #3

P: n/a
On Tue, Jul 25, 2006 at 11:32:23PM EDT, ha********@gmail.com wrote:
>
Alan Franzoni wrote:
Il 22 Jul 2006 15:48:36 -0700, ha********@gmail.com ha scritto:
http://diveintopython.org/getting_to...ting_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..

???
Jul 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.