Re: instance name

2005-04-05 Thread max(01)*
many many thanks to each and everyone who bothered to answer my op. best regards macs -- http://mail.python.org/mailman/listinfo/python-list

Re: instance name

2005-04-02 Thread Bengt Richter
On Sat, 02 Apr 2005 15:48:21 GMT, "max(01)*" <[EMAIL PROTECTED]> wrote: >hi. > >is there a way to define a class method which prints the instance name? > >e.g.: > > >>> class class_1: >... def myName(self): >... what should i do here >... > >>> instance_1 = class_1() > >>> instance_1

Re: instance name

2005-04-02 Thread Mark Winrock
max(01)* wrote: hi. is there a way to define a class method which prints the instance name? e.g.: >>> class class_1: ... def myName(self): ... what should i do here ... >>> instance_1 = class_1() >>> instance_1.myName() 'instance_1' >>> bye macs macs, The object instance doesn't k

Re: instance name

2005-04-02 Thread max(01)*
Irmen de Jong wrote: max(01)* wrote: hi. is there a way to define a class method which prints the instance name? e.g.: class class_1: ... def myName(self): ... what should i do here ... instance_1 = class_1() instance_1.myName() 'instance_1' bye macs What should the following do, yo

Re: instance name

2005-04-02 Thread max(01)*
Andrew Koenig wrote: "max(01)*" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] is there a way to define a class method which prints the instance name? The term "the instance name" is misleading, because it assumes, without saying so explicitly, that every instance has a unique nam

Re: instance name

2005-04-02 Thread Irmen de Jong
max(01)* wrote: > hi. > > is there a way to define a class method which prints the instance name? > > e.g.: > class class_1: > ... def myName(self): > ... what should i do here > ... instance_1 = class_1() instance_1.myName() > 'instance_1' > > bye > > macs W

Re: instance name

2005-04-02 Thread Andrew Koenig
"max(01)*" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > is there a way to define a class method which prints the instance name? The term "the instance name" is misleading, because it assumes, without saying so explicitly, that every instance has a unique name. In fact, there i