Mm, yeah, it's a bit in the middle ground here.

The short answer is that explicit comparisons of numeric types to zero is unpythonic. =) In this case it's also semantically clear, translating approximately to "if the object does/doesn't have a stream ID".

I generally have a problem with this aspect of the HTTP/2 spec: it's very specific about implementation details. The HPACK spec is even worse.