Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #197735

Re: What does this "See help(type(self)) for accurate signature." actually mean?

From ram@zedat.fu-berlin.de (Stefan Ram)
Newsgroups comp.lang.python
Subject Re: What does this "See help(type(self)) for accurate signature." actually mean?
Date 2026-03-16 15:25 +0000
Organization Stefan Ram
Message-ID <help-20260316162503@ram.dialup.fu-berlin.de> (permalink)
References <4b9i8m-p1m93.ln1@q957.zbmc.eu> <slrn10rfm6h.7ge.jon+usenet@raven.unequivocal.eu>

Show all headers | View raw


Jon Ribbens <jon+usenet@unequivocal.eu> wrote or quoted:
>                         I don't know why it says "type(self)",
>because help(foo) where 'foo' is an instance of a class 'xyz'
>seems to display the same as help(xyz) anyway.

|Python 3.14

|>>> import types

|>>> self = types.SimpleNamespace()

|>>> self.__doc__ = "my custom doc"

|>>> help(self)
|Help on SimpleNamespace:
|namespace(__doc__='my custom doc')
|    my custom doc

|>>> help(type(self))
|Help on class SimpleNamespace in module types:
|class SimpleNamespace(builtins.object)
| |  SimpleNamespace(mapping_or_iterable=(), /, **kwargs)
| |  A simple attribute-based namespace.
| |  Methods defined here:
. . .

>                                 the class itself doesn't have
>a docstring either. So there is nothing to display no matter what
>you type.

  Even without docstrings, info about names, parameters etc. is shown.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

What does this "See help(type(self)) for accurate signature." actually mean? Chris Green <cl@isbd.net> - 2026-03-15 09:05 +0000
  Re: What does this "See help(type(self)) for accurate signature." actually mean? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-15 21:21 +0000
    Re: What does this "See help(type(self)) for accurate signature." actually mean? Chris Green <cl@isbd.net> - 2026-03-16 08:53 +0000
      Re: What does this "See help(type(self)) for accurate signature." actually mean? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-16 09:15 +0000
  Re: What does this "See help(type(self)) for accurate signature." actually mean? Jon Ribbens <jon+usenet@unequivocal.eu> - 2026-03-16 10:17 +0000
    Re: What does this "See help(type(self)) for accurate signature." actually mean? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-03-16 15:25 +0000
      Re: What does this "See help(type(self)) for accurate signature." actually mean? Jon Ribbens <jon+usenet@unequivocal.eu> - 2026-03-16 17:01 +0000

csiph-web