1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: Use "!=" instead of "is not" for value comparisons.
Python 3.8 warns about a misuse of "is not" that will technically work
since Python keeps a cache of some predefined objects for e.g. small
integers, it is still not a good idea to compare integers and string
literals with "is".
Forwarded: no
Author: Peter Pentchev <roam@ringlet.net>
Last-Update: 2020-02-09
--- a/clint/eng.py
+++ b/clint/eng.py
@@ -41,7 +41,7 @@
collector.append(conj)
- elif left is not 0:
+ elif left != 0:
collector.append(separator)
return unicode(str().join(collector))
--- a/clint/textui/prompt.py
+++ b/clint/textui/prompt.py
@@ -65,7 +65,7 @@
validators = [RegexValidator(r'.+')]
# Let's build the prompt
- if prompt[-1] is not ' ':
+ if prompt[-1] != ' ':
prompt += ' '
if default:
|