[Python-bugs-list] [ python-Bugs-473274 ] Tut. 6.3: builtins misspelled (original) (raw)

noreply@sourceforge.net noreply@sourceforge.net
Sat, 20 Oct 2001 21:35:24 -0700


Bugs item #473274, was opened at 2001-10-20 15:20 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=473274&group_id=5470

Category: Documentation Group: Not a Bug Status: Closed Resolution: Invalid Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: Tut. 6.3: builtins misspelled

Initial Comment: There's a small error in section 6.3 of the Tutorial: It says "builtin" in several places, which should be "builtins".

By the way: Great tutorial, it's very helpful!

Best regards Oliver Fromme <olli@secnetix.de>


Comment By: Tim Peters (timone) Date: 2001-10-20 21:35

Message: Logged In: YES user_id=31435

Oliver, it looks like you missed reading the line

import builtin

right before the

dir(builtin)

you're talking about in section 6.3. The import is necessary! Trust me when I tell you that you really don't want to know about the differences between builtin and builtins yet .


Comment By: Nobody/Anonymous (nobody) Date: 2001-10-20 20:05

Message: Logged In: NO

OK, I'm not a Python expert, I'm just reading the Tutorial and trying the examples. One of the examples in section 6.3 is "dir(builtin)". When I try this with Python 2.1.1, this is what I get:

dir(builtin) Traceback (most recent call last): File "", line 1, in ? NameError: name 'builtin' is not defined

However, when I add an "s", it works as described:

dir(builtins) ['ArithmeticError', 'AssertionError', 'AttributeError', ......]

So, it very much looks like there is a typo in the Tutorial. I'm sorry if I haven't made myself clear enough in my first message.

Best regards Oliver Fromme


Comment By: Guido van Rossum (gvanrossum) Date: 2001-10-20 17:55

Message: Logged In: YES user_id=6380

Nonsense. builtin is right. builtins is a different thing altogether!


You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105470&aid=473274&group_id=5470