[Python-ideas] anonymous object support

Devin Jeanpierre jeanpierreda at gmail.com
Thu Aug 4 16:05:13 CEST 2011


> I heard that particular pattern leaks memory?

I don't believe it does anymore, because of the cyclic garbage collector.

Devin

On Thu, Aug 4, 2011 at 9:54 AM, dag.odenhall at gmail.com
<dag.odenhall at gmail.com> wrote:
> 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