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


Groups > comp.lang.python > #197694

Re: I always forget how to access information about classes and methods - how to do it?

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: I always forget how to access information about classes and methods - how to do it?
Date 9 Mar 2026 19:21:50 GMT
Organization Stefan Ram
Lines 37
Expires 1 Mar 2027 11:59:58 GMT
Message-ID <doc-20260309201609@ram.dialup.fu-berlin.de> (permalink)
References <mv838m-uvld2.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 x1Sf9DRqZ3GRz/SqqfOVAg2ML68OZLzjNsQxH8j0KnkcPL
Cancel-Lock sha1:iGPL49V6Da4JV/kLQ+3O+rGOCDc= sha256:pYJ2S6te/MSWPDhALt/T/9mwAX/5aE41NJcuz1kqSTo=
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:197694

Show key headers only | View raw


Chris Green <cl@isbd.net> wrote or quoted:
>I know one can access information about python3 classes and methods
>(e.g. list the methods in a class, show the parameters for a method,
>etc.) but I always forget how to do it.

  You can say (in the interactive console), with "int" as an
  example of a class and "to_bytes" as an example of a method
  (each line is a separate input):

int
int.to_bytes
(1).to_bytes.__qualname__
type( int )
type( int.to_bytes )
type( 1 )
type( (1).to_bytes )
dir( int )
dir( int.to_bytes )
help( int )
help( int.to_bytes )
help( 1 )
help( (1).to_bytes )
help() # and then later "quit" to quit help mode

  . Some IDEs give information or help about functions etc.
  after pressing some key, like Ctrl-Space or something.

  On Windows, the program group "Python" often has entries
  "Python 3.14 Manuals" and "Python 3.14 Module Docs".

  You can also find the Manuals in the Web as Web pages;
  I prefer the PDF manuals, but these now have been discontinued.

  You can ask any AI chatbot, "Tell me about the Python class int!",
  "What's the Web address of the Python documentation!" etc.

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


Thread

I always forget how to access information about classes and methods - how to do it? Chris Green <cl@isbd.net> - 2026-03-09 16:27 +0000
  Re: I always forget how to access information about classes and methods - how to do it? John Bokma <contact@johnbokma.com> - 2026-03-09 17:52 +0100
  Re: I always forget how to access information about classes and methods - how to do it? ram@zedat.fu-berlin.de (Stefan Ram) - 2026-03-09 19:21 +0000
  Re: I always forget how to access information about classes and methods - how to do it? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-09 20:25 +0000
    Re: I always forget how to access information about classes and methods - how to do it? Chris Green <cl@isbd.net> - 2026-03-09 21:26 +0000
      Re: I always forget how to access information about classes and methods - how to do it? Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-03-09 23:12 +0000

csiph-web