[Python-Dev] Arbitrary attributes on funcs and methods
Mon, 10 Apr 2000 18:37:45 -0700 (PDT)
On Mon, 10 Apr 2000 firstname.lastname@example.org wrote:
> GS> And note that the getattro/setattro is preferred. It is easy
> GS> to extract the char* from them; the other direction requires
> GS> construction of an object.
> Good point.
Oh. Also, I noticed that you removed a handy optimization from the getattr
function. Testing a character for '_' *before* calling strcmp() will save
a good chunk of time, especially considering how often this function is
used. Basically, review whether a quick test can save a strmp() call (and
can be easily integrated).
Greg Stein, http://www.lyra.org/