[Python-Dev] Excess help() output

anatoly techtonik techtonik at gmail.com
Tue Jul 1 07:16:52 CEST 2014


The help() output is confusing for beginners:

  >>> class B(object):
  ...   pass
  >>> help(B)
  Help on class B in module __main__:

  class B(__builtin__.object)
   |  Data descriptors defined here:
   |  __dict__
   |      dictionary for instance variables (if defined)
   |  __weakref__
   |      list of weak references to the object (if defined)

Is it possible to remove this section from help output?
Why is it here at all?

  >>> dir(B)
  ['__class__', '__delattr__', '__dict__', '__doc__', '__format__',
'__getattribute__', '__hash__', '__init__', '__module__', '__new__',
'__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
'__sizeof__', '__str__', '__subclasshook__', '__weakref__']

anatoly t.

More information about the Python-Dev mailing list