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

Change suggestion to Python code comments #1217

Open
MikeB2019x opened this issue Nov 1, 2024 · 0 comments
Open

Change suggestion to Python code comments #1217

MikeB2019x opened this issue Nov 1, 2024 · 0 comments

Comments

@MikeB2019x
Copy link

Currently the code for python here does not indicate what int values are appropriate for entry. Suggest the description for the mode parameter be altered from:

# Compress a byte string.
def compress(string, mode=MODE_GENERIC, quality=11, lgwin=22, lgblock=0):
    """Compress a byte string.

    Args:
      string (bytes): The input data.
      mode (int, optional): The compression mode can be MODE_GENERIC (default),
        MODE_TEXT (for UTF-8 format text input) or MODE_FONT (for WOFF 2.0).

to:

# Compress a byte string.
def compress(string, mode=0, quality=11, lgwin=22, lgblock=0):
    """Compress a byte string.

    Args:
      string (bytes): The input data.
      mode (int, optional): The compression mode can be of value 0 for  generic input (MODE_GENERIC),
      of value 1 for UTF-8 format text input (MODE_TEXT ) or of value 2 for WOFF 2.0 font data (MODE_FONT).
      Default is 0.

The integer values are drawn from the commentary in the `

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