Skip to content

Add wrapcol and ignorechars parameters for other Base XX codecs #146431

@serhiy-storchaka

Description

@serhiy-storchaka

Feature or enhancement

Ascii85 codec supported parameters wrapcol (in encoder) and ignorechars (in decoder) from the beginning. Base64 codec got them in #143214, because Base64 is often used in multiline form. But the paragraphs in (RFC 4648)[https://datatracker.ietf.org/doc/html/rfc4648] which allow producing multiline encoded data and allow ignoring newlines and other non-alphabet characters are not Base64 specific. They are applicable to other standard codecs. So, it would be worth to add corresponding options for Base32 and Base16 codecs. Since all of them are now implemented in C, they can share implementation.

The only codecs left are Base85 (non-Ascii85) and Z85, which are specified without mentioning multiline form or ignoring non-aplhabet characters. But it is easy to add this feature for them too.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15new features, bugs and security fixesstdlibStandard 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