A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-February/116705.html below:

[Python-Dev] accept string in a2b and base64?

[Python-Dev] accept string in a2b and base64? [Python-Dev] accept string in a2b and base64?Antoine Pitrou solipsis at pitrou.net
Tue Feb 21 13:28:07 CET 2012
On Tue, 21 Feb 2012 12:51:08 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> 
> My one concern with the base64 patch is that it doesn't test that
> mixing types triggers TypeError. While this shouldn't require any
> extra code (the error should arise naturally from the method
> implementation), it should still be tested explicitly to ensure type
> mismatches fail as expected.

I don't think mixing types is a concern. The extra parameters to the
base64 functions aren't mixed into the original string, they are used to
modify the decoding algorithm.

So it's like typing `open(b"LICENSE", "r")`: the fast that `b"LICENSE"`
is bytes while `"r"` is str isn't really a problem.

Regards

Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4