[Python-ideas] anonymous object support

dag.odenhall at gmail.com dag.odenhall at gmail.com
Thu Aug 4 15:54:00 CEST 2011


On 4 August 2011 06:39, Devin Jeanpierre <jeanpierreda at gmail.com> wrote:
> On Wed, Aug 3, 2011 at 11:49 PM, Herman Sheremetyev <herman at swebpage.com> wrote:
>> Both of them do the same thing as well as give access to the values
>> using [] notation. There are probably other examples in third party
>> libraries.
>
> Sure. Another stdlib-ish example is Sphinx, which does it in
> sphinx.util.attrdict. And you can search google code for
> 'self.__dict__ = self', which reveals a particular(ly nasty) pattern
> for it with many instances.
>
> Devin

I heard that particular pattern leaks memory?



More information about the Python-ideas mailing list