Georg Brandl wrote:
> Nick Coghlan schrieb:
>> Armin Ronacher wrote:
>>> Speaking of atom keys() / values() / items() operations: I guess we will
>>> see more of those problems in threaded situations when people start to
>>> convert code over to Python. I've seen quite a few situations where code
Nick Coghlan schrieb:
> Armin Ronacher wrote:
>> Speaking of atom keys() / values() / items() operations: I guess we will
>> see more of those problems in threaded situations when people start to
>> convert code over to Python. I've seen quite a few situations where code
>> relays on keys() holdin
Armin Ronacher wrote:
> Speaking of atom keys() / values() / items() operations: I guess we will
> see more of those problems in threaded situations when people start to
> convert code over to Python. I've seen quite a few situations where code
> relays on keys() holding the interpreter lock.
lis
Hi,
Adam Olsen gmail.com> writes:
> IMO, this is a deeper problem than suggested. As far as I know,
> python does not (and should not) make promises as to when it'll
> collect object. We should expect weakrefs to be cleared at random
> points, and code defensively.
It doesn't promise when obje
Hi,
Josiah Carlson gmail.com> writes:
> i = list(d.keys())
Obviously that doesn't solve the problem. list() consumes the generator
one after another, objects can still die when the list is created. Imagine
the following example which uses threads::
from time import sleep
from weakref
I would also like to point out that I submitted a patch related to
that a couple of months ago in:
http://bugs.python.org/issue839159
But it never got any attention :( I'm not sure if it is still relevant.
Virgil
On 13-Sep-08, at 10:20 PM, Armin Ronacher wrote:
Hi everybody,
In Python
On Sat, Sep 13, 2008 at 2:20 PM, Armin Ronacher
<[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> In Python 2.x when iterating over a weak key dictionary for example, the
> common
> idom for doing that was calling dictionary.keys() to ensure that a list of all
> objects is returned it was safe to ite
On Sat, Sep 13, 2008 at 5:21 PM, Scott David Daniels
<[EMAIL PROTECTED]> wrote:
> Josiah Carlson wrote:
>>
>> On Sat, Sep 13, 2008 at 1:20 PM, Armin Ronacher wrote:
>>>
>>> Iterating over weak key dictionaries might not be the most common task
>>> but I
>>> know some situations where this is necess
Josiah Carlson wrote:
On Sat, Sep 13, 2008 at 1:20 PM, Armin Ronacher wrote:
Iterating over weak key dictionaries might not be the most common task but I
know some situations where this is necessary. Unfortunately I can't see a
way to achieve that in Python 3.
i = list(d.keys())
Surely
On Sat, Sep 13, 2008 at 1:20 PM, Armin Ronacher
<[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> In Python 2.x when iterating over a weak key dictionary for example, the
> common
> idom for doing that was calling dictionary.keys() to ensure that a list of all
> objects is returned it was safe to ite
Hi everybody,
In Python 2.x when iterating over a weak key dictionary for example, the common
idom for doing that was calling dictionary.keys() to ensure that a list of all
objects is returned it was safe to iterate over as a weak reference could stop
existing during dict iteration which of course
11 matches
Mail list logo