Don't use __slots__ (was Re: performance of dictionary lookup vs. object attributes)

Gabriel Genellina gagsl-py at yahoo.com.ar
Fri Aug 25 11:23:07 EDT 2006


At Friday 25/8/2006 11:34, Aahz wrote:

> >The results seem okay. Python is a dynamic language, object attributes
> >(and methods, etc) are kept inside a dict, where you can add and remove
> >them when you like. So using a dict is faster.
> >You can also take a look at __slots__
>Taking a look at __slots__ is fine as long as you don't actually use
>them.

Why?


Gabriel Genellina
Softlab SRL 


	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas




More information about the Python-list mailing list