A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2007-February/071104.html below:

[Python-Dev] Recent experience with the _ast module

[Python-Dev] Recent experience with the _ast module [Python-Dev] Recent experience with the _ast module"Martin v. Löwis" martin at v.loewis.de
Wed Feb 14 10:23:24 CET 2007
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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4