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: References: <4b9i8m-p1m93.ln1@q957.zbmc.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 Jon Ribbens 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.