diff options
author | Benjamin Peterson <devnull@localhost> | 2008-09-21 20:43:04 -0500 |
---|---|---|
committer | Benjamin Peterson <devnull@localhost> | 2008-09-21 20:43:04 -0500 |
commit | 6e735f945f1845566f9e5dbcf956b6d1c8f54916 (patch) | |
tree | 289c18c285ce89e58743b228fbcea73c3222c1b2 /pygments/lexers/_mapping.py | |
parent | 179c00fef6ca282a523242a666889d94579cd436 (diff) | |
download | pygments-6e735f945f1845566f9e5dbcf956b6d1c8f54916.tar.gz |
open() should be used instead of file()
Diffstat (limited to 'pygments/lexers/_mapping.py')
-rw-r--r-- | pygments/lexers/_mapping.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/_mapping.py b/pygments/lexers/_mapping.py index ba255dae..ba107b26 100644 --- a/pygments/lexers/_mapping.py +++ b/pygments/lexers/_mapping.py @@ -168,7 +168,7 @@ if __name__ == '__main__': found_lexers.sort() # extract useful sourcecode from this file - f = file(__file__) + f = open(__file__) try: content = f.read() finally: @@ -177,7 +177,7 @@ if __name__ == '__main__': footer = content[content.find("if __name__ == '__main__':"):] # write new file - f = file(__file__, 'w') + f = open(__file__, 'w') f.write(header) f.write('LEXERS = {\n %s\n}\n\n' % ',\n '.join(found_lexers)) f.write(footer) |