Re: making objects with individual attributes!

2007-03-20 Thread Alejandro
Thanks to all!!! Now it works! -- http://mail.python.org/mailman/listinfo/python-list

Re: making objects with individual attributes!

2007-03-20 Thread Diez B. Roggisch
Alejandro wrote: > I have created a class: > > class document: > > titre = '' > haveWords = set() > > def __init__(self, string): > > self.titre = string > > # > > doc1 = document('doc1') > doc2 = document('doc2') > > doc1.haveWords.add(1) > doc2.haveWords.add(2)

Re: making objects with individual attributes!

2007-03-20 Thread kyosohma
On Mar 20, 11:08 am, "Alejandro" <[EMAIL PROTECTED]> wrote: > I have created a class: > > class document: > > titre = '' > haveWords = set() > > def __init__(self, string): > > self.titre = string > > # > > doc1 = document('doc1') > doc2 = document('doc2') > > doc1.haveW

Re: making objects with individual attributes!

2007-03-20 Thread Gary Herron
Alejandro wrote: > I have created a class: > > class document: > > titre = '' > haveWords = set() > > def __init__(self, string): > > self.titre = string > > # > > doc1 = document('doc1') > doc2 = document('doc2') > > doc1.haveWords.add(1) > doc2.haveWords.add(2) > > > p

making objects with individual attributes!

2007-03-20 Thread Alejandro
I have created a class: class document: titre = '' haveWords = set() def __init__(self, string): self.titre = string # doc1 = document('doc1') doc2 = document('doc2') doc1.haveWords.add(1) doc2.haveWords.add(2) print doc1.haveWords # i get set([1, 2]) doc1 an