On Tue, May 19, 2020 at 9:43 PM David Mertz <[email protected]> wrote:

> Currently, I'd probably program my intention like this.  Let's assume this
> is something where the '=' is allowed in the middle.
>

Getting increasingly hypothetical...

Anyway, you could write:

```
assert not salt.endswith("=" * 3)  # at most 2 ='s allowed
salt = salt.rstrip("=")
```
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/T6T5WGL5OIQYWYHVFOHVAXLH3UDEBPUG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to