Python's Performance

Terry Hancock hancock at
Mon Oct 10 23:18:00 CEST 2005

On Saturday 08 October 2005 01:54 pm, Fredrik Lundh wrote:
> Dave wrote:
> > Yes, I would like to know how many internal string operations are done inside
> > the Python interpreter.
> when you're doing what?
> how do you define "internal string operations", btw?

He's got to be talking about runtime name-binding.  In
other words, when you refer to:


the Python interpreter actually knows you labeled that attribute 'spam',
and the string is stored in a.__dict__ , so you can also access it as

getattr(a, 'spam')


I'm pretty sure this is what string "internment" is for, though, and
that such lookups are optimized out pretty much whenever possible.

Terry Hancock ( hancock at )
Anansi Spaceworks

More information about the Python-list mailing list