[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: > So why is it necessary (and a release blocker) to fix a bug in > inspect._signature_fromstr, but a terrible idea to fix a bug in > inspect.ismethod? I was actually writing a comment, when I received this on my email ;) Let me explain my point of view. > An

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Larry Hastings
Larry Hastings added the comment: So why is it necessary (and a release blocker) to fix a bug in inspect._signature_fromstr, but a terrible idea to fix a bug in inspect.ismethod? -- ___ Python tracker ___

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: Indeed, here it is: #20711 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: > Rather, I'm proposing to fix a bug in ismethod. Oh, sorry, that's what I meant. I don't think it's good to fix it either. But please hold on, I think I found a bug in inspect.signature. -- ___ Python tracker

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Larry Hastings
Larry Hastings added the comment: I'm not proposing to modify isbuiltin. Rather, I'm proposing to fix a bug in ismethod. -- ___ Python tracker ___ _

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: I don't think we should touch 'inspect.isbuiltin' at this stage. Please consider my proposal instead. -- ___ Python tracker ___

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Larry Hastings
Larry Hastings added the comment: We discussed it in python-dev: https://mail.python.org/pipermail/python-dev/2014-January/132051.html And the overwhelming majority voted +1 for "don't show self for bound methods". So I'd like to change it for 3.4. (I meant to get it in earlier but lacked

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Larry Hastings
Larry Hastings added the comment: Whoops, the test suite hadn't finished when I posted that, and it had an error. Here's an updated patch that fixes the tests. Also, there's one more minor fix in the patch. pydoc has cut-and-pasted code for HTML versus text rendering, and they had fallen out

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: (The thing with my proposal, is that pydoc will handle everything that 'inspect.signature' supports + it's behaviour won't change at all) -- ___ Python tracker ___

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Yury Selivanov
Yury Selivanov added the comment: Larry, I think you can use undocumented and private (but still heavily tested) 'inspect._signature_internal(skip_bound_arg=False)', instead of signature. That will give you a Signature object with 'self' parameter always included. And in 3.5 we'll probably ma

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Larry Hastings
New submission from Larry Hastings: inspect has a bug: * inspect.ismethod() returns False for bound methods on builtins. If I fix that, that exposes a bug in pydoc: * pydoc's two docroutine() functions assume that bound methods have a __func__; bound builtins do not. The only reason pydoc ass

[issue20710] Make inspect and pydoc consistent about bound methods

2014-02-20 Thread Larry Hastings
Changes by Larry Hastings : -- stage: -> patch review type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Uns