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/2005-May/053448.html below:

[Python-Dev] The decorator module

[Python-Dev] The decorator module [Python-Dev] The decorator moduleGuido van Rossum gvanrossum at gmail.com
Fri May 6 16:55:22 CEST 2005
[jJ]
> > Incidentally, would the resulting functions be a bit faster if you compiled
> > the lambda instead of repeatedly eval ing it, or does the eval overhead still
> > apply?

[Michele]
> Honestly, I don't care, since "eval" happens only once at decoration time.
> There is no "eval" overhead at calling time, so I do not expect to have
> problems. I am waiting for volunteers to perform profiling and
> performance analysis ;)

Watch out. I didn't see the code referred to, but realize that eval is
*very* expensive on some other implementations of Python (Jython and
IronPython). Eval should only be used if there is actual user-provided
input that you don't know yet when your module is compiled; not to get
around some limitation in the language there are usually ways around
that, and occasionally we add one, e.g. getattr()).

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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