On Tue, May 19, 2020 at 9:43 PM David Mertz <me...@gnosis.cx> 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 -- 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/T6T5WGL5OIQYWYHVFOHVAXLH3UDEBPUG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to