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?

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
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 16 Mar 2026 15:25:36 GMT
Organization Stefan Ram
Lines 33
Expires 1 Mar 2027 11:59:58 GMT
Message-ID <help-20260316162503@ram.dialup.fu-berlin.de> (permalink)
References <4b9i8m-p1m93.ln1@q957.zbmc.eu> <slrn10rfm6h.7ge.jon+usenet@raven.unequivocal.eu>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace news.uni-berlin.de ntlOPM2Db1eVk5T6HX41pQkq/IPS0GWSCxNdcRzcKPcA99
Cancel-Lock sha1:WAy0DjhYC7ERTE/Lxm6XTnlsF8M= sha256:ceOovQzcvGKUALCz5hhkfC+0EUa/d75w4HTKAliqQ0w=
X-Copyright (C) Copyright 2026 Stefan Ram. All rights reserved. Distribution through any means other than regular usenet channels is forbidden. It is forbidden to publish this article in the Web, to change URIs of this article into links, and to transfer the body without this notice, but quotations of parts in other Usenet posts are allowed.
X-No-Archive Yes
Archive no
X-No-Archive-Readme "X-No-Archive" is set, because this prevents some services to mirror the article in the web. But the article may be kept on a Usenet archive server with only NNTP access.
X-No-Html yes
Content-Language en
Xref csiph.com comp.lang.python:197735

Show key headers only | 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