[issue19674] Add introspection information for builtins

2013-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 78ec18f5cb45 by Larry Hastings in branch 'default': Issue #19674: inspect.signature() now produces a correct signature http://hg.python.org/cpython/rev/78ec18f5cb45 -- nosy: +python-dev ___ Python tracker

[issue19674] Add introspection information for builtins

2013-11-23 Thread Larry Hastings
Changes by Larry Hastings : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ _

[issue19674] Add introspection information for builtins

2013-11-23 Thread Larry Hastings
Larry Hastings added the comment: Fresh patch attached. pydoc now uses inspect.signature instead of inspect.getfullargspec to generate the arguments for the function, and supports builtins. That's everything :D Planning on checking this in pretty soon, to get it in for beta (which hopefully

[issue19674] Add introspection information for builtins

2013-11-23 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me (I see this as the key benefit of argument clinic). For 3.5, we can look at ducktyping on the attribute, but for now I think it's worth keeping that text format internal to CPython. -- ___ Python tracker

[issue19674] Add introspection information for builtins

2013-11-22 Thread Larry Hastings
Larry Hastings added the comment: I went with __text_signature__. I also did some more polishing, and added / fixed the unit tests, and even added a Misc/NEWS. Is it good enough to go in before the beta? -- Added file: http://bugs.python.org/file32785/larry.introspection.for.builtin

[issue19674] Add introspection information for builtins

2013-11-22 Thread Brett Cannon
Brett Cannon added the comment: __signature_text__? __textsignature__? No need to abbreviate that much since there is no built-in function equivalent and people are not expected to work with it. -- ___ Python tracker

[issue19674] Add introspection information for builtins

2013-11-22 Thread Larry Hastings
Larry Hastings added the comment: Anybody have a better name for __textsig__ ? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue19674] Add introspection information for builtins

2013-11-21 Thread Nick Coghlan
Nick Coghlan added the comment: "still works" as in "doesn't crash and the docstrings are still missing to save memory". -- ___ Python tracker ___ ___

[issue19674] Add introspection information for builtins

2013-11-21 Thread Larry Hastings
Larry Hastings added the comment: I changed it to "(". Patch attached. Still works. -- Added file: http://bugs.python.org/file32763/larry.introspection.for.builtins.patch.2.txt ___ Python tracker ___

[issue19674] Add introspection information for builtins

2013-11-21 Thread Brett Cannon
Brett Cannon added the comment: For Nick: "still works" as in the metadata is still available without docstrings or "still works" as in it won't crash? -- ___ Python tracker ___

[issue19674] Add introspection information for builtins

2013-11-21 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue19674] Add introspection information for builtins

2013-11-21 Thread Nick Coghlan
Nick Coghlan added the comment: Sounds good to me (with either Larry's or Guido's spelling). We should ensure this still works with the config option that disables docstrings entirely. -- ___ Python tracker _

[issue19674] Add introspection information for builtins

2013-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Great! See also issue16842 and issue16638. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ P

[issue19674] Add introspection information for builtins

2013-11-20 Thread Larry Hastings
Larry Hastings added the comment: I was deliberately trying to avoid something that a person might do by accident. Also, "def (" is consistently only five bytes, whereas "pterodactyl (" or whatever will often be much longer, in case static data size is a concern. But I could switch it to that

[issue19674] Add introspection information for builtins

2013-11-20 Thread Guido van Rossum
Guido van Rossum added the comment: I think there's a similar but slightly different convention in Sphinx autodoc -- the first line of the docstring can be "name(...)" . Isn't that better than def? -- ___ Python tracker

[issue19674] Add introspection information for builtins

2013-11-20 Thread Larry Hastings
Changes by Larry Hastings : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue19674] Add introspection information for builtins

2013-11-20 Thread Larry Hastings
Larry Hastings added the comment: (Well, except for Object/methodobject.c.) -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue19674] Add introspection information for builtins

2013-11-20 Thread Larry Hastings
Larry Hastings added the comment: If you review, you can ignore the changes to the .c files, those only got touched because of the new autogenerated "def (" lines in the docstrings. No other changes there. -- ___ Python tracker

[issue19674] Add introspection information for builtins

2013-11-20 Thread Larry Hastings
New submission from Larry Hastings: Let's see if we can get introspection information for builtins using the Clinic for 3.4. Georg suggested part of the approach while we were hanging out in Tokyo. I'd considered it previously before but dispensed with the idea because it seemed too loopy.