Re: class instance customization

2010-04-19 Thread Alexander
On 18.04.2010 13:23, Steven D'Aprano wrote: > On Sat, 17 Apr 2010 19:55:44 +0400, Alexander wrote: > > >> Ok, I'll try to explain on the following example. Let's consider class >> MyClass that holds one string and concatenate it with other not defined >> in this class: >> > [...] > >>

Re: class instance customization

2010-04-19 Thread Jean-Michel Pichavant
Alexander wrote: On 17.04.2010 18:32, Steven D'Aprano wrote: On Sat, 17 Apr 2010 13:09:43 +0400, Alexander wrote: Hi, list. I've some nontrivial class implementation MyClass and its instance my: my = MyClass(args) MyClass uses in internals some variable which is not defined in My

Re: class instance customization

2010-04-18 Thread Steven D'Aprano
On Sat, 17 Apr 2010 19:55:44 +0400, Alexander wrote: > Ok, I'll try to explain on the following example. Let's consider class > MyClass that holds one string and concatenate it with other not defined > in this class: [...] > and with working application: > > a = MyClass() > a.set('key1') > > b1

Re: class instance customization

2010-04-17 Thread Alexander
On 17.04.2010 18:32, Steven D'Aprano wrote: > On Sat, 17 Apr 2010 13:09:43 +0400, Alexander wrote: > > >> Hi, list. >> >> I've some nontrivial class implementation MyClass and its instance my: >> >> my = MyClass(args) >> >> MyClass uses in internals some variable which is not defined in MyClass

Re: class instance customization

2010-04-17 Thread Steven D'Aprano
On Sat, 17 Apr 2010 13:09:43 +0400, Alexander wrote: > Hi, list. > > I've some nontrivial class implementation MyClass and its instance my: > > my = MyClass(args) > > MyClass uses in internals some variable which is not defined in MyClass > itself. I want to extend instance of MyClass at runtim