On Jul 11, 9:49 pm, James Stroud <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I'd like to implement a subclass of string that works like this:
>
> m = MyString('mail')
> m == 'fail'
>
> > True
>
> m == 'mail'
>
> > False
>
> m in ['fail', hail']
>
> > True
>
> > My best
I'd like to implement a subclass of string that works like this:
>>>m = MyString('mail')
>>>m == 'fail'
True
>>>m == 'mail'
False
>>>m in ['fail', hail']
True
My best attempt for something like this is:
class MyString(str):
def __init__(self, seq):
if self == self.clean(seq): pass
else
I've got a set with contents like: [filename1.mp3, filename2.mp3,
filename3.mp3, ...]
I've got another set with contents like [filename1.ogg,
filename3.ogg, ...]
And another set with contents like [filename1, filename 2, ...]
I'd like to be able to compare set 1 with set 2 and have it match
filena