[Python-Dev] an unimportant question, ...

Antoine Pitrou solipsis at pitrou.net
Sun Mar 22 20:56:40 CET 2009


Christian Tismer <tismer <at> stackless.com> writes:
> 
> Or was it maybe to just keep the string layout on many
> common platforms compatible, in order to save rebuilding
> so many windows extension modules?
> 
> If the latter is true and the only reason, I vote for reclaiming
> the three bytes. Maybe it saves a tree or two. Maybe it hurts
> very little if done for Python 3000.
> 
> In any case, use the version that saves the most energy. 

Well, if you want to make the str type in py3k smaller, there is a more massive
saving to be done by making it a PyVarObject, rather than allocating the storage
separately.

A patch has existed for that for a long time now, it probably needs updating if
anyone is interested:
http://bugs.python.org/issue1943





More information about the Python-Dev mailing list