Message246470
For what it's worth (since it was mentioned toward the end of this thread as an offending package) Astropy has a patch now to fix its misbehavior with respect to this issue.
I do feel like this would be nice to fix though, since I think it's awkward to have code that on its face clearly has a docstring, but still have to check that the docstring may be None. Just to put it out there if anyone were really interested, I identified two ways this could be changed:
1) For functions add a new co_flags flag indicating that docstrings were optimized out. This is at the cost of a co_flags flag.
2) Keep an empty string as the first element in co_consts, at the const of one additional constant per function that previously had a docstring (still cheaper than the docstring itself in most cases).
Of course, it would still break backward compatibility for code that expects None for an optimized out docstring, I guess, and probably isn't worth either of the above two sacrifices at the end of the day. |
|
Date |
User |
Action |
Args |
2015-07-08 20:12:32 | erik.bray | set | recipients:
+ erik.bray, barry, rhettinger, jvs |
2015-07-08 20:12:32 | erik.bray | set | messageid: <1436386352.06.0.171837159615.issue23189@psf.upfronthosting.co.za> |
2015-07-08 20:12:32 | erik.bray | link | issue23189 messages |
2015-07-08 20:12:31 | erik.bray | create | |
|