Santoso Wijaya <santoso.wij...@gmail.com> added the comment:

Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> class SetSub(set):
...     def __init__(self, *args, **kwargs):
...             print 'foo'
...             set.__init__(self, *args, **kwargs)
...
>>> a = SetSub([2,7])
foo
>>> b = set([1,7])
>>> a ^ b
SetSub([1, 2])


Python 3.2 (r32:88445, Feb 20 2011, 21:30:00) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> class SetSub(set):
...     def __init__(self, *args, **kwargs):
...             print('foo')
...             set.__init__(self, *args, **kwargs)
...
>>> a = SetSub([2,7])
foo
>>> b = set([1,7])
>>> a ^ b
{1, 2}

----------
nosy: +santa4nt
versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 -Python 2.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11854>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to