Remove Literal Statements¶
This transform removes statements that consist entirely of a literal value. This includes docstrings. If a statement is required, it is replaced by a literal zero expression statement.
This transform will strip docstrings from the source. If the module uses the
__doc__ name the module docstring will
This transform is disabled by default. Enable by passing the
remove_literal_statements=True argument to the
--remove-literal-statements to the pyminify command.
"""This is my module docstring""" 'This is another string that has no runtime effect' b'Bytes literal' 0 1000 def test(): 'Function docstring'