• I always forget how to access information about classes and methods - h

    From Chris Green@3:633/10 to All on Mon Mar 9 16:27:02 2026
    Subject: I always forget how to access information about classes and methods - how to do it?

    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.

    Can someone enlighten me please, plus tell me where it is documented
    so that I can bookmark it and not need to ask again.

    --
    Chris Green
    ú

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From John Bokma@3:633/10 to All on Mon Mar 9 17:52:05 2026
    Subject: Re: I always forget how to access information about classes and methods - how to do it?

    On 09/03/2026 17:27, Chris Green wrote:
    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.

    Can someone enlighten me please, plus tell me where it is documented
    so that I can bookmark it and not need to ask again.

    inspect? https://docs.python.org/3/library/inspect.html


    --
    Static tumblelog generator: https://github.com/john-bokma/tumblelog/
    Available as Python or Perl. Example tumblelog: https://plurrrr.com/

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Mon Mar 9 20:25:41 2026
    Subject: Re: I always forget how to access information about classes and methods - how to do it?

    On Mon, 9 Mar 2026 16:27:02 +0000, Chris Green wrote:

    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.

    The ?help()? function?

    <https://docs.python.org/3/library/functions.html#help>

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Chris Green@3:633/10 to All on Mon Mar 9 21:26:22 2026
    Subject: Re: I always forget how to access information about classes and methods - how to do it?

    Lawrence D?Oliveiro <ldo@nz.invalid> wrote:
    On Mon, 9 Mar 2026 16:27:02 +0000, Chris Green wrote:

    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.

    The ?help()? function?

    <https://docs.python.org/3/library/functions.html#help>

    Yes, that's it!! Thank you (and I've bookmarked that link, thank you
    som more)

    --
    Chris Green
    ú

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Lawrence D?Oliveiro@3:633/10 to All on Mon Mar 9 23:12:07 2026
    Subject: Re: I always forget how to access information about classes and methods - how to do it?

    On Mon, 9 Mar 2026 21:26:22 +0000, Chris Green wrote:

    ... and I've bookmarked that link ...

    I refer to <https://docs.python.org/3/library/> so often that I don?t
    even need to bookmark it: it?s in my browser?s autocomplete.

    --- PyGate Linux v1.5.12
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)