Larry Hastings wrote:
inspect.signature gets this right:
import inspect
str(inspect.signature(c.foo))
'(a)'
Not always.
: Python 3.4.0b2+ (default:32f9e0ae23f7, Jan 18 2014, 13:56:31)
: [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
: Type help, copyright,
On Sat, Jan 25, 2014 at 3:07 PM, Larry Hastings la...@hastings.org wrote:
What should it be?
A) pydoc and help() should not show bound parameters in the signature, like
inspect.signature.
B) pydoc and help() should show bound parameters in the signature, like
inspect.getfullargspec.
Vote
On 01/25/2014 03:34 AM, Anders J. Munch wrote:
Larry Hastings wrote:
inspect.signature gets this right:
import inspect
str(inspect.signature(c.foo))
'(a)'
Not always.
: Python 3.4.0b2+ (default:32f9e0ae23f7, Jan 18 2014, 13:56:31)
: [GCC 4.2.1 Compatible Apple LLVM 4.2
On Fri, 24 Jan 2014 20:07:43 -0800
Larry Hastings la...@hastings.org wrote:
A) pydoc and help() should not show bound parameters in the signature,
like inspect.signature.
-1 from me. The problem is this will make help(c.foo) inconsistent with
help(c) and help(C), and is bound to confuse
On 01/25/2014 05:37 AM, Antoine Pitrou wrote:
Speaking of which, I think asking for votes before all arguments have
been made is counter-productive.
Sorry, I didn't realize there was an established protocol for this.
//arry/
___
Python-Dev mailing
On Sat, 25 Jan 2014 05:42:58 -0800
Larry Hastings la...@hastings.org wrote:
On 01/25/2014 05:37 AM, Antoine Pitrou wrote:
Speaking of which, I think asking for votes before all arguments have
been made is counter-productive.
Sorry, I didn't realize there was an established protocol for
On 01/25/2014 04:34 AM, Chris Angelico wrote:
On Sat, Jan 25, 2014 at 3:07 PM, Larry Hastings la...@hastings.org wrote:
What should it be?
A) pydoc and help() should not show bound parameters in the signature, like
inspect.signature.
Vote for A. As far as I'm concerned, all these foo are
(Quick, because apparently nobody reads the long ones!)
In Python 3.3:
class C:
...def foo(self, a): pass
...
c = C()
help(c.foo)
shows you the signature foo(self, a). As in, it claims it accepts two
parameters. The function actually only accepts one parameter,
On Fri, Jan 24, 2014 at 10:07 PM, Larry Hastings la...@hastings.org wrote:
(Quick, because apparently nobody reads the long ones!)
In Python 3.3:
class C:
...def foo(self, a): pass
...
c = C()
help(c.foo)
shows you the signature foo(self, a). As in, it claims it accepts two
On Fri, Jan 24, 2014 at 08:07:43PM -0800, Larry Hastings wrote:
(Quick, because apparently nobody reads the long ones!)
In Python 3.3:
class C:
...def foo(self, a): pass
...
c = C()
help(c.foo)
shows you the signature foo(self, a).
That matches the
On 25 January 2014 14:36, Steven D'Aprano st...@pearwood.info wrote:
On Fri, Jan 24, 2014 at 08:07:43PM -0800, Larry Hastings wrote:
A) pydoc and help() should not show bound parameters in the signature,
like inspect.signature.
B) pydoc and help() should show bound parameters in the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 01/24/2014 11:07 PM, Larry Hastings wrote:
A) pydoc and help() should not show bound parameters in the signature,
like inspect.signature. B) pydoc and help() should show bound
parameters in the signature, like inspect.getfullargspec.
+1 for
12 matches
Mail list logo