Message133903
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} |
|
Date |
User |
Action |
Args |
2011-04-16 19:21:40 | santoso.wijaya | set | recipients:
+ santoso.wijaya, rhettinger, stutzbach, Robert.Burke |
2011-04-16 19:21:40 | santoso.wijaya | set | messageid: <1302981700.52.0.76413378193.issue11854@psf.upfronthosting.co.za> |
2011-04-16 19:21:39 | santoso.wijaya | link | issue11854 messages |
2011-04-16 19:21:39 | santoso.wijaya | create | |
|