On Fri, Jul 8, 2016, 1:03 AM Franklin? Lee <leewangzhong+python@gmail.com> wrote:

On Jul 6, 2016 2:40 PM, "Michael Selik" <michael.selik@gmail.com> wrote:
> Instead it seems the best way given the current behavior is to write:
>
>     len(bytestring) == bytestring.count(b'z')
>
> While I wait for PEP 467, can anyone suggest a better way to write that?

How about
    set(bytestring) == set(b'z')

Ah, that makes sense. I'd thought of using a set literal on the right-hand, but for some reason using set constructor slipped my mind.