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
Hi,
Josiah Carlson josiah.carlson at 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
Hi,
Adam Olsen rhamph at 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
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.
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() holding the
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
relays on
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
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 iterate
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 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 necessary.
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 iterate
11 matches
Mail list logo