Skip to content

base64.z85encode should have "pad" parameter #143103

@haukex

Description

@haukex

Feature or enhancement

Proposal:

The documentation of z85encode links to the Z85 specification, which states:

The binary frame SHALL have a length that is divisible by 4 with no remainder.

Both a85encode and b85encode have a pad parameter that causes the input to be padded with b'\0' so its length is a multiple of 4 bytes before encoding.

z85encode does not have this parameter, but I think it should, to allow users to more easily meet the Z85 specification.

Adding the parameter is trivial and backcompat issues can be avoided by defaulting it to False (like the other two functions). Pull request coming in a few minutes.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions