On Tue, May 19, 2020 at 3:50 PM Alex Hall <alex.moj...@gmail.com> wrote:

> Anyway, you could write:
> assert not salt.endswith("=" * 3)  # at most 2 ='s allowed
> salt = salt.rstrip("=")
>

Yes, I *could* write that.  It feels a bit more  cryptic than the version I
mentioned.  But it's fine.

-- 
The dead increasingly dominate and strangle both the living and the
not-yet born.  Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/LPRFI4KS7FFK2MOJV7LZUCGWTKSH7TSQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to