Greg Ewing schrieb: > It would seem even easier (and a lot faster) to use an > array to go from C enum --> some object, which could > as well be an interned string as anything else.
Have you actually looked at the code? How could it be faster than PyObject* ast2obj_boolop(boolop_ty o) { switch(o) { case And: Py_INCREF(And_singleton); return And_singleton; case Or: Py_INCREF(Or_singleton); return Or_singleton; } return NULL; /* cannot happen */ } Not sure what interned strings have to do with it. Regards, Martin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com