diff options
author | Raymond Hettinger <python@rcn.com> | 2016-08-17 07:46:48 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-08-17 07:46:48 (GMT) |
commit | 8579a8fd630a0d34f90a0b4745518b362b2ea774 (patch) | |
tree | 40c9eb9e57660a5243beab142ad2c48a97b52de6 /Lib/collections | |
parent | 4d02b1b2bb77ea8c40dea1e3a2f17949e6ebdc63 (diff) | |
download | cpython-8579a8fd630a0d34f90a0b4745518b362b2ea774.zip cpython-8579a8fd630a0d34f90a0b4745518b362b2ea774.tar.gz cpython-8579a8fd630a0d34f90a0b4745518b362b2ea774.tar.bz2 |
Minor readability tweak
Diffstat (limited to 'Lib/collections')
-rw-r--r-- | Lib/collections/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index f465e74..03ecea2 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -393,7 +393,7 @@ def namedtuple(typename, field_names, *, verbose=False, rename=False): field_names[index] = '_%d' % index seen.add(name) for name in [typename] + field_names: - if type(name) != str: + if type(name) is not str: raise TypeError('Type names and field names must be strings') if not name.isidentifier(): raise ValueError('Type names and field names must be valid ' |