Replace use of dict.has_key with `key in dict`

This commit is contained in:
Alex Gaynor 2013-11-26 14:31:52 -06:00
parent bb5ab908cc
commit ac17525039
1 changed files with 2 additions and 2 deletions

View File

@ -99,11 +99,11 @@ def visit_snippet(self, node):
linenos = node.rawsource.count('\n') >= self.highlightlinenothreshold - 1
fname = node['filename']
highlight_args = node.get('highlight_args', {})
if node.has_key('language'):
if 'language' in node:
# code-block directives
lang = node['language']
highlight_args['force'] = True
if node.has_key('linenos'):
if 'linenos' in node:
linenos = node['linenos']
def warner(msg):