Author gregory.p.smith
Recipients gregory.p.smith
Date 2019-05-30.18:00:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I'm spawning this issue of as a separate feature from (adding string dedent method and an optimization to do it at compile timer on constants).

It'd be great if docstrings were given a similar treatment.  Right now we carry the whitespace burden within the str constants for __doc__ stored in all code objects in the process.  This adds up.

This is not _quite_ the same as calling textwrap.dedent() or the upcoming str.dedent method on them at compile time.  We need to special case the first line of docstrings.  inspect.getdoc() is our library function that does this for us today.

Change of breaking things with this change?  not impossible, but extremely minor.  Something using docstrings as data _and_ depending on leading indentation whitespace preservation would not like this.  I am not aware of anything that would ever do that.
Date User Action Args
2019-05-30 18:00:00gregory.p.smithsetrecipients: + gregory.p.smith
2019-05-30 18:00:00gregory.p.smithsetmessageid: <>
2019-05-30 18:00:00gregory.p.smithlinkissue37102 messages
2019-05-30 18:00:00gregory.p.smithcreate