Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev

Zope2 porting Acquisition

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


ranjithkannikara at gmail

May 22, 2008, 12:41 AM

Post #1 of 3 (249 views)
Permalink
Zope2 porting Acquisition

Hello everyone,

I came across an error in module Acquisition, while trying to port
zope2 to python2.5. There was a discussion over the same topic in
JAN-2008. In acquisition the wrapper compare is returning false
irrespective of the parameters.

>>> c = A()
>>> b.c = c
>>> b.c.d = c
>>> b.c.d == c
1
>>> b.c.d == b.c
1
>>> b.c == c
1

here 1) b.c.d == c is returning false and
2) b.c.d == b.c returns 1
3) b.c == c returns false
And the problem I stuck with was that in the comparisons 1 and 3 the
function Wrapper_compare defined in _Acquisition.c is not even called.

How a function (say Wrapper_compare) from a C-API is being called on
reaching a line like >>> b.c.d == c .
_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


plone at hannosch

May 22, 2008, 12:58 AM

Post #2 of 3 (243 views)
Permalink
Re: Zope2 porting Acquisition [In reply to]

Hi.

ranjith kannikara wrote:
> I came across an error in module Acquisition, while trying to port
> zope2 to python2.5. There was a discussion over the same topic in
> JAN-2008. In acquisition the wrapper compare is returning false
> irrespective of the parameters.
>
> And the problem I stuck with was that in the comparisons 1 and 3 the
> function Wrapper_compare defined in _Acquisition.c is not even called.
>
> How a function (say Wrapper_compare) from a C-API is being called on
> reaching a line like >>> b.c.d == c .

You want to read
http://mail.zope.org/pipermail/zope-dev/2008-January/030784.html

It gives you all the hints you need to digg into this some more.

As a side note, please make sure you base your work on Zope trunk, as
that has seen quite a lot of changes to Acquisition.c recently.

Hanno
(who's no good with the C API)

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )


plone at hannosch

May 29, 2008, 1:53 PM

Post #3 of 3 (176 views)
Permalink
Re: Zope2 porting Acquisition [In reply to]

Hi.

Hanno Schlichting wrote:
> ranjith kannikara wrote:
>> I came across an error in module Acquisition, while trying to port
>> zope2 to python2.5. There was a discussion over the same topic in
>> JAN-2008. In acquisition the wrapper compare is returning false
>> irrespective of the parameters.
>>
>> And the problem I stuck with was that in the comparisons 1 and 3 the
>> function Wrapper_compare defined in _Acquisition.c is not even called.
>>
>> How a function (say Wrapper_compare) from a C-API is being called on
>> reaching a line like >>> b.c.d == c .
>
> You want to read
> http://mail.zope.org/pipermail/zope-dev/2008-January/030784.html
>
> It gives you all the hints you need to digg into this some more.

Just making sure, you did find http://www.python.org/dev/peps/pep-0207
explaining 'Rich Comparisons' in Python by now, right? Please don't be
shy and ask if you want to know more or share some of your results.
Sidnei is not the only one, who is eager to help you :)

Hanno

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.