Re: object vs class oriented -- xotcl

2008-01-31 Thread neumann
On 29 Jan., 19:22, William Pursell <[EMAIL PROTECTED]> wrote: > I > believe "per object mixin" is the correct > term for such an animal. The first several google > hits on that phrase all reference xotcl, so I'm > not sure if that is an xotcl inspired vocabulary > that isn't really standard. wel

Re: object vs class oriented -- xotcl

2008-01-29 Thread Gabriel Genellina
En Tue, 29 Jan 2008 16:22:24 -0200, William Pursell <[EMAIL PROTECTED]> escribi�: > I'm fairly excited at the idea of being able to > do per-object mixins in xotcl. I guess it would > look like this in python: > > BROKEN CODE: > a = object() > a.__class__.append( foo ) > a.__class__.append( bar

Re: object vs class oriented -- xotcl

2008-01-29 Thread William Pursell
On Jan 24, 9:16 pm, "Guilherme Polo" <[EMAIL PROTECTED]> wrote: > 2008/1/24, William Pursell <[EMAIL PROTECTED]>: > > Can I do it in Python? > > > class A(object): pass > class B(object): pass > > a = A() > a.__class__ = B > > That ? Maybe you meant something else. That is what I was referring

Re: object vs class oriented -- xotcl

2008-01-25 Thread Bruno Desthuilliers
Steven D'Aprano a écrit : > On Thu, 24 Jan 2008 12:35:44 -0800, William Pursell wrote: > >> The ability to have an object change class is >> certainly (to me) a novel idea. Can I do it in Python? > > Yes, mostly. Example: > (snip) > > If you actually play around with this, you'll soon find th

Re: object vs class oriented -- xotcl

2008-01-24 Thread Steven D'Aprano
On Thu, 24 Jan 2008 12:35:44 -0800, William Pursell wrote: > Basically, you can > instantiate an object A of class Foo, and later change A to be an object > of class Bar. Does Python support this type of flexibility? As I > stated above, I've been away from Python for awhile now, and am a bit >

Re: object vs class oriented -- xotcl

2008-01-24 Thread Guilherme Polo
2008/1/24, William Pursell <[EMAIL PROTECTED]>: > > I've been away from Python for at least a year, and in the interim > have spent a little time looking at the XOTcl object framework for > Tcl. One of the interesting features of XOTcl is the ability for an > object to change class dynamically. T

Re: object vs class oriented -- xotcl

2008-01-24 Thread Jonathan Gardner
On Jan 24, 12:35 pm, William Pursell <[EMAIL PROTECTED]> wrote: > I'm not sure that describes the method well. Basically, you can > instantiate an object A of class Foo, and later change A to be an > object of class Bar. Does Python support this type of flexibility? > As I stated above, I've bee