python: Better check for keys in dicts
[mesa.git] / src / mapi / glapi / gen / gl_procs.py
index a7bc909ce2824f588a0934129d92fc2b98d7fbe6..5718f42ab61fd12cbc3ad2feb4fc78c316145867 100644 (file)
@@ -135,7 +135,7 @@ typedef struct {
                 for n in func.entry_points:
                     cat, num = api.get_category_for_name(n)
                     if (cat.startswith("es") or cat.startswith("GL_OES")):
-                        if not categories.has_key(cat):
+                        if cat not in categories:
                             categories[cat] = []
                         proto = 'GLAPI %s GLAPIENTRY %s(%s);' \
                                         % (func.return_type, "gl" + n, func.get_parameter_string(n))