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

Default-replacement in case a module uses __doc__ on remove_literal_statements=True? #38

Open
phorward opened this issue Nov 16, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@phorward
Copy link

Hey there!

First of all, thanks for providing this useful piece of software! It should be improved and find more friends in the Python community.

In a pull request for Pyodide, my idea was to strip down the entire Python standard library using python-minifier to reduce download bandwidth, using the --remove-literal-statements-flag. Pyodide is a port of the CPython interpreter as web-assembly, running a Python in the browser. Therefore, making the standard library as small as possible is perfect use-case for python-minifier.

I've seen in the documentation, that the remove_literal_statements-option is retained when the module uses the __doc__ name, which is the case in some modules of the Python standard library, for example in ssl.py.

My question for this issue: Would it be an choice to provide a further command-line option for replacing the doc-strings in a module in this case by either an empty string or something like "stripped by python-minifier" or something similar? This would also safe some more space, especially in this use-case.

Thanks a lot for any support.

@dflook
Copy link
Owner

dflook commented Nov 17, 2021

Hi @phorward, that's a great idea.

@phorward
Copy link
Author

Hi @phorward, that's a great idea.

Thank you, I did a first pull request as a draft in #39.

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

No branches or pull requests

2 participants