ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: Identity inconsistency and unification of types and classes
by Erik Max Francis other posts by this author
Jul 1 2003 4:00AM messages near this date
Re: Identity inconsistency and unification of types and classes | Suggesting for overloading the assign operator
Rim wrote:

>  With the great unification of types and classes, what will happen to
>  the
>  following identity inconsistency?
>  
>  >>> class myint(int): pass
>  ...
>  >>> a=int(1); b=int(1)
>  >>> a is b
>  1
>  >>> a=myint(1); b=myint(1)
>  >>> a is b
>  0

Whether or not int(1) is int(1) is purely an optimization issue, so one
wonders why one would be concerned about it.

-- 
   Erik Max Francis && max@[...].com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ They have rights who dare defend them.
\__/  Roger Baldwin
-- 
http://mail.python.org/mailman/listinfo/python-list
Thread:
Rim
Michael Hudson
Moshe Zadka
Erik Max Francis

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved