Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for None in __doc__ before changing it. #52

Closed
pbrod opened this issue Jan 13, 2015 · 0 comments
Closed

Check for None in __doc__ before changing it. #52

pbrod opened this issue Jan 13, 2015 · 0 comments

Comments

@pbrod
Copy link

pbrod commented Jan 13, 2015

Python code byte-compiled with -OO has doc-strings stripped out.

This creates problems when compiling different packages which changes the doc-strings by doing something like this:
doc += "additional text"
(when the docstring is 'None', this will fail).

mgcv_cubic_splines.py does this and thus creates problems when trying to bytecompile it with the -OO option using cx_freeze/py2exe.

In order to fix this, I would propose to change all the lines which say:
doc += CubicRegressionSpline.common_doc
with
doc =doc +CubicRegressionSpline.common_doc if doc else ''

See also:
http://bugs.python.org/issue23189#
http://stackoverflow.com/questions/22299532/unsupported-operand-types-for-nonetype-and-str-winappdbg-error-after-c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant