slight scanner C code simplification
authorStefan Behnel <scoder@users.berlios.de>
Wed, 8 Dec 2010 22:25:46 +0000 (23:25 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 8 Dec 2010 22:25:46 +0000 (23:25 +0100)
Cython/Compiler/Scanning.py

index ff719ca68d891700102c4edc8608ef8bfeee8ce5..232e82eae3c07bc8a7adfaf813b07a373bfd06cc 100644 (file)
@@ -360,10 +360,10 @@ class PyrexScanner(Scanner):
         if sy == IDENT:
             if systring in self.keywords:
                 if systring == u'print' and print_function in self.context.future_directives:
-                    self.keywords.remove('print')
+                    self.keywords.discard('print')
                     systring = EncodedString(systring)
                 elif systring == u'exec' and self.context.language_level >= 3:
-                    self.keywords.remove('exec')
+                    self.keywords.discard('exec')
                     systring = EncodedString(systring)
                 else:
                     sy = systring