On Nov 19, 4:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> Yep; looks like a bug in the set/frozenset implementation.
Thanks! I was about to report this to bugs.python.org, but it
looks as though Raymond's been at the time machine again:
http://bugs.python.org/issue1721812
It's fixed
srinivasan srinivas wrote:
Hi,
I am getting an error while executing the following snippet. If i comment out
method __repr__ , it works fine.
class fs(frozenset):
def __new__(cls, *data):
data = sorted(data)
self = frozenset.__new__(cls, data)
self.__data = data
En Wed, 19 Nov 2008 11:56:28 -0200, Mark Dickinson <[EMAIL PROTECTED]>
escribió:
On Nov 19, 12:39 pm, srinivasan srinivas <[EMAIL PROTECTED]>
wrote:
a1 = fs(1,2,3)
a2 = fs(3,4,5)
print a1.difference(a2)
Error:
return "%s(%r)" % (self.__class__.__name__, self.__data)
AttributeError: 'fs'
On Nov 19, 12:39 pm, srinivasan srinivas <[EMAIL PROTECTED]>
wrote:
> a1 = fs(1,2,3)
> a2 = fs(3,4,5)
> print a1.difference(a2)
>
> Error:
> return "%s(%r)" % (self.__class__.__name__, self.__data)
> AttributeError: 'fs' object has no attribute '_fs__data'
I guess you need to implement the dif
Hi,
I am getting an error while executing the following snippet. If i comment out
method __repr__ , it works fine.
class fs(frozenset):
def __new__(cls, *data):
data = sorted(data)
self = frozenset.__new__(cls, data)
self.__data = data
return self
def __re