summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorstrank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2008-07-23 19:18:19 +0000
committerstrank <strank@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2008-07-23 19:18:19 +0000
commit83816c45579ffbfab7206e21818ecdd12ddcd8f6 (patch)
tree6d90955100c70e412ec4e2618f87afcf76284677 /tools
parent466ad4a1c03f23b3a72ca50f614ec552ec8b02ba (diff)
downloaddocutils-83816c45579ffbfab7206e21818ecdd12ddcd8f6.tar.gz
Replace all has_key with the in operator.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@5607 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'tools')
-rwxr-xr-xtools/dev/unicode2rstsubs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/dev/unicode2rstsubs.py b/tools/dev/unicode2rstsubs.py
index 9161e10c1..22ac07ecc 100755
--- a/tools/dev/unicode2rstsubs.py
+++ b/tools/dev/unicode2rstsubs.py
@@ -129,11 +129,11 @@ class CharacterEntitySetExtractor:
set = self.entity_set_name(attributes['set'])
if not set:
return
- if not self.sets.has_key(set):
+ if set not in self.sets:
print 'bad set: %r' % set
return
entity = attributes['id']
- assert (not self.sets[set].has_key(entity)
+ assert (entity not in self.sets[set]
or self.sets[set][entity] == self.charid), \
('sets[%r][%r] == %r (!= %r)'
% (set, entity, self.sets[set][entity], self.charid))