firebase-admin-python icon indicating copy to clipboard operation
firebase-admin-python copied to clipboard

Comparison with `is`

Open BeneCollyridam opened this issue 6 years ago • 2 comments

Code choice

In firebsae_admin/_token_gen.py line 290-291 I noticed the sub-expression: payload.get('v') is 0 and I was wondering if this shouldn't be payload.get('v') == 0.

I know that integers from -5 to 256 are cached in CPython, but I don't think it is good to rely on that when checking for equality (if that is the case).

BeneCollyridam avatar Jan 10 '20 10:01 BeneCollyridam

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jan 10 '20 10:01 google-oss-bot

Fixed in #384

hiranya911 avatar Jan 17 '20 22:01 hiranya911