Am Montag, den 15.03.2010, 05:42 -0700 schrieb Michael.Lausch:
On Mar 15, 11:40 am, Steven D'Aprano wrote:
On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote:
Hi,
I managed to get confused by Python, which is not such an easy task.
The problem i have is root
Am Montag, den 15.03.2010, 05:42 -0700 schrieb Michael.Lausch:
> On Mar 15, 11:40 am, Steven D'Aprano cybersource.com.au> wrote:
> > On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote:
> > > Hi,
> >
> > > I managed to get confused by Python, which is not such an easy task.
> >
> > > The prob
Michael.Lausch a écrit :
(snip)
Now I'm trying to understand why this is the case.
How is Foo.__dict__['_ref'] different from Foo._ref?
Shouldn't it return the same attribute?
It's an application of the descriptor protocol:
http://wiki.python.org/moin/FromFunctionToMethod
--
http://mail.py
On Mar 15, 11:40 am, Steven D'Aprano wrote:
> On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote:
> > Hi,
>
> > I managed to get confused by Python, which is not such an easy task.
>
> > The problem i have is rooted in marshalling, JSON and Dojo. I need some
> > static class in function with
On Mon, 15 Mar 2010 01:43:02 -0700, Michael.Lausch wrote:
> Hi,
>
> I managed to get confused by Python, which is not such an easy task.
>
> The problem i have is rooted in marshalling, JSON and Dojo. I need some
> static class in function with the name "$ref" i tried:
> class Foo(object):
>
Hi,
I managed to get confused by Python, which is not such an easy task.
The problem i have is rooted in marshalling, JSON and Dojo.
I need some static class in function with the name "$ref"
i tried:
class Foo(object):
@staticmethod
def _ref(o):
pass
setattr(Foo, "$ref", Foo._re