This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients larry, mark.dickinson
Date 2012-12-28.14:53:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1356706402.78.0.475857869126.issue16801@psf.upfronthosting.co.za>
In-reply-to
Content
It's an interesting idea.  This sounds like the wrong solution to me, though:  it's significant extra machinery to produce a solution that only fixes a small handful of cases;  IOW, the benefit / cost ratio seems to small to make this worth it.  E.g., apart from the function calls that you mention, what about expressions?  "-0x8000" isn't a numeric literal, so the 'original representation' information attached to "0x8000" will have been lost.

I'm also sceptical that this can be done as simply as you describe:  isn't the AST no longer available at the time that the docstring is built?

Perhaps what we need instead is a general mechanism to override the generated signature line?
History
Date User Action Args
2012-12-28 14:53:22mark.dickinsonsetrecipients: + mark.dickinson, larry
2012-12-28 14:53:22mark.dickinsonsetmessageid: <1356706402.78.0.475857869126.issue16801@psf.upfronthosting.co.za>
2012-12-28 14:53:22mark.dickinsonlinkissue16801 messages
2012-12-28 14:53:22mark.dickinsoncreate