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


Groups > comp.lang.python > #197730

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

Path csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups comp.lang.python
Subject Re: What does this "See help(type(self)) for accurate signature." actually mean?
Date Sun, 15 Mar 2026 21:21:58 -0000 (UTC)
Organization A noiseless patient Spider
Lines 32
Message-ID <10p77tm$1eam9$3@dont-email.me> (permalink)
References <4b9i8m-p1m93.ln1@q957.zbmc.eu>
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Sun, 15 Mar 2026 21:21:59 +0000 (UTC)
Injection-Info dont-email.me; posting-host="d7c060878fc999e1bb5840edaaeb8fbb"; logging-data="1518281"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lFR32lMHqhW7EWwPQsu7V"
User-Agent Pan/0.165 (Kostiantynivka)
Cancel-Lock sha1:SO0sRPfYXPePzT0lhBVnbNCr0T8=
Xref csiph.com comp.lang.python:197730

Show key headers only | View raw


On Sun, 15 Mar 2026 09:05:08 +0000, Chris Green wrote:

> I see this message in several places in the help() output for gpiod:
> "See help(type(self)) for accurate signature.", but I can't work out
> what I actually need to type into help() to get a result.
>
> So, for example, I say 'help("gpiod.line_settings")', I see, among
> other things:-
>
>      |  __init__(
>      |      self,
>      |      direction: gpiod.line.Direction = <Direction.AS_IS: 1>,
>      |      edge_detection: gpiod.line.Edge = <Edge.NONE: 1>,
>      |      bias: gpiod.line.Bias = <Bias.AS_IS: 1>,
>      |      drive: gpiod.line.Drive = <Drive.PUSH_PULL: 1>,
>      |      active_low: bool = False,
>      |      debounce_period: datetime.timedelta = datetime.timedelta(0),
>      |      event_clock: gpiod.line.Clock = <Clock.MONOTONIC: 1>,
>      |      output_value: gpiod.line.Value = <Value.INACTIVE: 0>
>      |  ) -> None
>      |      Initialize self.  See help(type(self)) for accurate signature.
>
> What do I actually need to type to get that "accurate signature"?

Actually, you’ve got it right there. When you call the class to create
an instance, you are actually calling the __init__ method (or the
__new__ method, if that’s defined). So the arguments you need to pass
are exactly those accepted by that method. No need to look anywhere
else for the “accurate signature”, since you have just posted it.

Or it just means that the detailed docstring explaining what all those
args are for is attached to the class, not this __init__ method.

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