> The lesson of this? Do not make mutable classes hashable.
That could be it! I'll try. Thanks a lot!
> The obvious follow-up is to ask how to make an immutable class.
>
> http://northernplanets.blogspot.com/2007/01/immutable-instances-in-python.h
> tml
>
--
http://mail.python.org/mailman/lis
* Steven D'Aprano:
[snip]
The obvious follow-up is to ask how to make an immutable class.
http://northernplanets.blogspot.com/2007/01/immutable-instances-in-python.html
Thanks, I've been wondering about that.
By the way, the link at the bottom in the article you linked to, referring to an
On Tue, 22 Dec 2009 17:33:04 +0100, John wrote:
> Hi there,
>
> I have a rather lengthy program that troubles me for quite some time.
> After some debugging, I arrived at the following assertion error:
>
> for e in edges.keys():
> assert edges.has_key(e)
>
> Oops!? Is there ANY way that s
On Tue, 22 Dec 2009 17:47:14 +0100, Christian Heimes wrote:
> John schrieb:
>> Hi there,
>>
>> I have a rather lengthy program that troubles me for quite some time.
>> After some debugging, I arrived at the following assertion error:
>>
>> for e in edges.keys():
>> assert edges.has_key(e)
>
On 12/22/2009 11:33 AM, John wrote:
Hi there,
I have a rather lengthy program that troubles me for quite some time. After
some debugging, I arrived at the following assertion error:
for e in edges.keys():
assert edges.has_key(e)
If you are claiming that the above *did* raise Assertion
On 12/23/2009 3:33 AM, John wrote:
Hi there,
I have a rather lengthy program that troubles me for quite some time. After
some debugging, I arrived at the following assertion error:
for e in edges.keys():
assert edges.has_key(e)
Oops!? Is there ANY way that something like this can possi
En Tue, 22 Dec 2009 13:56:36 -0300, John escribió:
another thread can remove the key prior to the has_key call; or perhaps
edges isn't a real dictionary?
of course. But unless there is a way of using threading without being
aware of
it, this is not the case. Also, edges is definitely a di
John wrote:
another thread can remove the key prior to the has_key call; or perhaps
edges isn't a real dictionary?
of course. But unless there is a way of using threading without being aware of
it, this is not the case. Also, edges is definitely a dict (has been declared
some lines before,
On Tue, Dec 22, 2009 at 8:56 AM, John wrote:
> > another thread can remove the key prior to the has_key call; or perhaps
> > edges isn't a real dictionary?
> >
>
> of course. But unless there is a way of using threading without being aware
> of
> it, this is not the case. Also, edges is definite
> another thread can remove the key prior to the has_key call; or perhaps
> edges isn't a real dictionary?
>
of course. But unless there is a way of using threading without being aware of
it, this is not the case. Also, edges is definitely a dict (has been declared
some lines before, and no ob
John schrieb:
> Hi there,
>
> I have a rather lengthy program that troubles me for quite some time. After
> some debugging, I arrived at the following assertion error:
>
> for e in edges.keys():
> assert edges.has_key(e)
>
> Oops!? Is there ANY way that something like this can possibly ha
John wrote:
Hi there,
I have a rather lengthy program that troubles me for quite some time. After
some debugging, I arrived at the following assertion error:
for e in edges.keys():
assert edges.has_key(e)
Oops!? Is there ANY way that something like this can possibly happen?
Three w
On 22/12/2009 16:33, John wrote:
Hi there,
I have a rather lengthy program that troubles me for quite some time. After
some debugging, I arrived at the following assertion error:
for e in edges.keys():
assert edges.has_key(e)
Oops!? Is there ANY way that something like this can possibl
13 matches
Mail list logo