Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > python 2 coercion

Thread Tools

python 2 coercion

Holger Joukl
Posts: n/a
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 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
It worked with 1.5.2, and everything still seems to work except for ==
I suspect that somewhere on the way some coercion is tried but does not
but fail to see the steps that lead to this situation.


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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post enhanced for auto-coercion (fixed-width python integers) Andy Sy Python 0 02-03-2006 11:13 AM
PEP: Generalised String Coercion Neil Schemenauer Python 1 08-22-2005 09:55 AM
list() coercion Ian Bicking Python 5 07-18-2003 03:18 AM
RE: list() coercion Bob Gailer Python 1 07-17-2003 07:29 PM
jython type coercion to interface type Harald Kirsch Python 1 06-26-2003 12:35 PM