Skip to content

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

@phorward

Description

@phorward

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions