On Oct 7, 2008, at 23:31, Martin v. Löwis wrote:
In V3 is it your intention that to be a key you must implement
tp_hash and tp_richcompare? If not I'll raise a bug against
3.0 on this issue.
I believe that cmp/tp_compare are being phased out, although
I think there was a heavy debate about th
> In V3 is it your intention that to be a key you must implement
> tp_hash and tp_richcompare? If not I'll raise a bug against
> 3.0 on this issue.
I believe that cmp/tp_compare are being phased out, although
I think there was a heavy debate about this.
In any case, I think you really need to imp
On Oct 5, 2008, at 19:47, Martin v. Löwis wrote:
Why does "key in wc_status_kind_wc" work when I use an object
returned
by keys() by not when I use pysvn.wc_status_kind.unversioned?
This is too little detail to come up with an explanation. Do your
objects support __eq__.
Regards,
Martin
>> Given that p.we.x seems to always return the same object (since the
>> hashes, which which appear to be ids, are the same), an __eq__ method
>> (which gets called in preference to __cmp__), possibly inherited, that
>> always return False is the only thing I can think of. (Hence Martin's
>> ques
On Oct 5, 2008, at 22:49, Terry Reedy wrote:
Given that p.we.x seems to always return the same object (since the
hashes, which which appear to be ids, are the same), an __eq__
method (which gets called in preference to __cmp__), possibly
inherited, that always return False is the only thin
On Oct 5, 2008, at 22:49, Terry Reedy wrote:
Barry Scott wrote:
for key in [pysvn.wc_status_kind.added,
pysvn.wc_status_kind.replaced,
pysvn.wc_status_kind.unversioned]:
print( '2 key', key, key in wc_status_kind_map, cmp( key,
pysvn.wc_status_kind.unversioned ),
Barry Scott wrote:
for key in [pysvn.wc_status_kind.added,
pysvn.wc_status_kind.replaced,
pysvn.wc_status_kind.unversioned]:
print( '2 key', key, key in wc_status_kind_map, cmp( key,
pysvn.wc_status_kind.unversioned ), hash( key ) )
try:
print( '2 lookup
> Why does "key in wc_status_kind_wc" work when I use an object returned
> by keys() by not when I use pysvn.wc_status_kind.unversioned?
This is too little detail to come up with an explanation. Do your
objects support __eq__.
Regards,
Martin
___
Python
I have a version of PyCXX ported to python 3.0 rc1 and its passing
its tests.
I'm porting pysvn to python 3.0 rc1 and hit an odd problem.
Given this dict:
wc_status_kind_map = {
pysvn.wc_status_kind.added: 'A',
pysvn.wc_status_kind.replaced: 'R',