diff options
Diffstat (limited to 'pygments/unistring.py')
-rw-r--r-- | pygments/unistring.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/pygments/unistring.py b/pygments/unistring.py index 3db3ae8e..c2a171dd 100644 --- a/pygments/unistring.py +++ b/pygments/unistring.py @@ -99,11 +99,8 @@ if __name__ == '__main__': categories = {} - f = open(__file__) - try: - content = f.read() - finally: - f.close() + with open(__file__) as fp: + content = fp.read() header = content[:content.find('Cc =')] footer = content[content.find("def combine("):] |