Steven Bethard wrote: > Stef Mientki wrote: >> Not sure I wrote the subject line correct, >> but the examples might explain if not clear > [snip] >> class pin2: >> def __init__ (self, naam): >> self.Name = naam >> >> aap2 = pin2('aap2') # seems completely redundant to me. >> print aap2.Name > > You can use class statements to create your instances with some > metaclass trickery. Unlike normal assignments, class statements get > access to the name being assigned. So you could write your class like::
thank you all guys, this gives me a lot to study, for the moment I'm satisfied with the fact that it "is possible". cheers, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list