This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author barry-scott
Recipients amaury.forgeotdarc, barry-scott
Date 2008-09-06.22:43:07
SpamBayes Score 1.2238851e-07
Marked as misclassified No
Message-id <1220740988.99.0.389180907278.issue3777@psf.upfronthosting.co.za>
In-reply-to
Content
My concern and yours is that this is not backwards
compatible. I would hate to see "random" failures
of extensions written using PyCXX because of this.

I'm tempted to says that I'll keep PyCXX 5.x as is for
Python 2.x and leave all the changes in semantics
for PyCXX 6.0 that will support Python 3.0.
And in Python 3.0 this problem does not exist
by design.

I don't think you example proves anything.
Python does not check at the pure python level at all.

>>> class X:
...     def __long__( self ):
...             return "Hello"
... 
>>> long( X() )
'Hello'
>>> 

You get all you deserve if you define __long__ and break its
API.
History
Date User Action Args
2008-09-06 22:43:09barry-scottsetrecipients: + barry-scott, amaury.forgeotdarc
2008-09-06 22:43:08barry-scottsetmessageid: <1220740988.99.0.389180907278.issue3777@psf.upfronthosting.co.za>
2008-09-06 22:43:08barry-scottlinkissue3777 messages
2008-09-06 22:43:07barry-scottcreate