[ python-Bugs-1190599 ] dir() docs show incorrect output

SourceForge.net noreply at sourceforge.net
Wed Apr 27 12:00:35 CEST 2005


Bugs item #1190599, was opened at 2005-04-26 23:20
Message generated for change (Comment added) made by mwh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1190599&group_id=5470

Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Martin Chase (stillflame)
>Assigned to: Michael Hudson (mwh)
Summary: dir() docs show incorrect output

Initial Comment:
on the web at http://docs.python.org/tut/node8.html

under "6.3 The dir() Function",
the following text reports incorrectly what the dir()
call would return:

  >>> a = [1, 2, 3, 4, 5]
  >>> import fibo, sys
  >>> fib = fibo.fib
  >>> dir()
  ['__builtins__', '__doc__', '__file__', '__name__',
'fib', 'fib2']

it should have 'a' and 'fibo',
but not 'fib2'.

----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2005-04-27 11:00

Message:
Logged In: YES 
user_id=6656

Fixed in rev 1.270 of Doc/tut.tex.

Thanks for the report!

----------------------------------------------------------------------

Comment By: George Yoshida (quiver)
Date: 2005-04-27 04:36

Message:
Logged In: YES 
user_id=671362

A minor nit.
> it should have 'a' and 'fibo',
'sys' is also missing from the list.

>>> dir()
['__builtins__', '__doc__', '__file__', '__name__', 'a', 'fib', 'fibo', '
sys']

----------------------------------------------------------------------

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


More information about the Python-bugs-list mailing list