summaryrefslogtreecommitdiff
path: root/kafka/protocol/api.py
diff options
context:
space:
mode:
authorChristian Clauss <cclauss@me.com>2020-01-10 09:09:50 +0100
committerJeff Widman <jeff@jeffwidman.com>2020-02-05 15:25:13 -0800
commit7008fd44f545f0794030dc73d9e1d3115ec9e88d (patch)
tree234795b75e86c39b2450374534f1f995e6ab9cf1 /kafka/protocol/api.py
parent385f60316eef4f16922c56a4b0f1a0e0891530d2 (diff)
downloadkafka-python-7008fd44f545f0794030dc73d9e1d3115ec9e88d.tar.gz
Use ==/!= to compare str, bytes, and int literals
Identity is not the same thing as equality in Python so use ==/!= to compare str, bytes, and int literals. In Python >= 3.8, these instances will raise __SyntaxWarnings__ so it is best to fix them now. https://docs.python.org/3.8/whatsnew/3.8.html#porting-to-python-3-8 % __python__ ``` >>> consumer = "cons" >>> consumer += "umer" >>> consumer == "consumer" True >>> consumer is "consumer" False >>> 0 == 0.0 True >>> 0 is 0.0 False ```
Diffstat (limited to 'kafka/protocol/api.py')
0 files changed, 0 insertions, 0 deletions