python 2 coercion

Discussion in 'Python' started by Holger Joukl, Aug 31, 2004.

  1. Holger Joukl

    Holger Joukl Guest

    Dear python list,
    What happens (on the C level) if the python interpreter executes
    a statement like
    if <some strange extension type> == None:
    ....

    Just a hint to the "entry point" would be great... What function/method
    is called for the two operands?
    I guess it is s.th. like PyObject_Compare or a type objects
    tp_compare method, but am a bit lost.

    Problem is I need to get an older number extension to work with python
    2.3.4.
    It worked with 1.5.2, and everything still seems to work except for ==
    comparison.
    I suspect that somewhere on the way some coercion is tried but does not
    work,
    but fail to see the steps that lead to this situation.

    Thanks,
    Holger

    Der Inhalt dieser E-Mail ist vertraulich. Falls Sie nicht der angegebene
    Empfänger sind oder falls diese E-Mail irrtümlich an Sie adressiert wurde,
    verständigen Sie bitte den Absender sofort und löschen Sie die E-Mail
    sodann. Das unerlaubte Kopieren sowie die unbefugte Übermittlung sind nicht
    gestattet. Die Sicherheit von Übermittlungen per E-Mail kann nicht
    garantiert werden. Falls Sie eine Bestätigung wünschen, fordern Sie bitte
    den Inhalt der E-Mail als Hardcopy an.

    The contents of this e-mail are confidential. If you are not the named
    addressee or if this transmission has been addressed to you in error,
    please notify the sender immediately and then delete this e-mail. Any
    unauthorized copying and transmission is forbidden. E-Mail transmission
    cannot be guaranteed to be secure. If verification is required, please
    request a hard copy version.
     
    Holger Joukl, Aug 31, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harald Kirsch

    jython type coercion to interface type

    Harald Kirsch, Jun 25, 2003, in forum: Python
    Replies:
    1
    Views:
    1,740
    Harald Kirsch
    Jun 26, 2003
  2. Ian Bicking

    list() coercion

    Ian Bicking, Jul 17, 2003, in forum: Python
    Replies:
    5
    Views:
    367
    Ian Bicking
    Jul 18, 2003
  3. Bob Gailer

    RE: list() coercion

    Bob Gailer, Jul 17, 2003, in forum: Python
    Replies:
    1
    Views:
    328
    Raymond Hettinger
    Jul 17, 2003
  4. Neil Schemenauer

    PEP: Generalised String Coercion

    Neil Schemenauer, Aug 6, 2005, in forum: Python
    Replies:
    1
    Views:
    300
  5. Andy Sy
    Replies:
    0
    Views:
    551
    Andy Sy
    Feb 3, 2006
Loading...

Share This Page