diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-10-09 15:16:03 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-10-09 15:16:03 (GMT) |
commit | b29614e047110f4d9af993a6cdec4e3fb7ef9738 (patch) | |
tree | a15a5ac7b508c5033f640123f498a322f44b04ce /Tools/scripts/texi2html.py | |
parent | a5119351519926971240f61d0c23a5fc5d00743e (diff) | |
download | cpython-b29614e047110f4d9af993a6cdec4e3fb7ef9738.zip cpython-b29614e047110f4d9af993a6cdec4e3fb7ef9738.tar.gz cpython-b29614e047110f4d9af993a6cdec4e3fb7ef9738.tar.bz2 |
compare singletons by identity not equality (closes #16712)
Patch from Serhiy Storchaka.
Diffstat (limited to 'Tools/scripts/texi2html.py')
-rwxr-xr-x | Tools/scripts/texi2html.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Tools/scripts/texi2html.py b/Tools/scripts/texi2html.py index af2147a..9983528 100755 --- a/Tools/scripts/texi2html.py +++ b/Tools/scripts/texi2html.py @@ -319,7 +319,7 @@ class TexinfoParser: # Start saving text in a buffer instead of writing it to a file def startsaving(self): - if self.savetext != None: + if self.savetext is not None: self.savestack.append(self.savetext) # print '*** Recursively saving text, expect trouble' self.savetext = '' @@ -341,7 +341,7 @@ class TexinfoParser: except: print(args) raise TypeError - if self.savetext != None: + if self.savetext is not None: self.savetext = self.savetext + text elif self.nodefp: self.nodefp.write(text) @@ -350,7 +350,7 @@ class TexinfoParser: # Complete the current node -- write footnotes and close file def endnode(self): - if self.savetext != None: + if self.savetext is not None: print('*** Still saving text at end of node') dummy = self.collectsavings() if self.footnotes: @@ -804,7 +804,7 @@ class TexinfoParser: def close_i(self): self.write('</I>') def open_footnote(self): - # if self.savetext <> None: + # if self.savetext is not None: # print '*** Recursive footnote -- expect weirdness' id = len(self.footnotes) + 1 self.write(self.FN_SOURCE_PATTERN % {'id': repr(id)}) @@ -1442,7 +1442,7 @@ class TexinfoParser: else: # some other character, e.g. '-' args = self.itemarg + ' ' + args - if self.itemnumber != None: + if self.itemnumber is not None: args = self.itemnumber + '. ' + args self.itemnumber = increment(self.itemnumber) if self.stack and self.stack[-1] == 'table': |