Re: @classmethod question

2008-04-30 Thread Bruno Desthuilliers
Scott SA a écrit : On 4/24/08, Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: It is a series of convenience methods, in this case I'm interacting with a database via an ORM (object-relational model). out of curiosity : which one ? I'm rapidly becoming a "django junkie"^TM (snip) Then if

Re: @classmethod question

2008-04-29 Thread Ivan Illarionov
On Tue, 29 Apr 2008 14:30:08 -0600, Scott SA wrote: > With that said, your reply is amazingly helpful in my quest to > understand python, Django, etc. Django is the ORM I referred to, so the > material you have written helps explain a few things. This was my intention. Django ORM uses Pyhton clas

Re: @classmethod question

2008-04-29 Thread Scott SA
On 4/23/08, Ivan Illarionov ([EMAIL PROTECTED]) wrote: >On 24 ???, 07:27, Scott SA <[EMAIL PROTECTED]> wrote: >> I'm using the @classemethod decorator for some convenience methods and for > >It would make sense to separate instance-level and class-level >behaviour with additional 'objects' namesp

Re: @classmethod question

2008-04-29 Thread Scott SA
On 4/24/08, Bruno Desthuilliers ([EMAIL PROTECTED]) wrote: >> It is a series of convenience methods, in this case I'm interacting >> with a database via an ORM (object-relational model). > >out of curiosity : which one ? I'm rapidly becoming a "django junkie"^TM >> I want the ability >> to call

Re: @classmethod question

2008-04-24 Thread M.-A. Lemburg
On 2008-04-24 05:27, Scott SA wrote: Hi, I'm using the @classemethod decorator for some convenience methods and for some reason, either mental block or otherwise, can't seem to figure out how to elegantly detect if the call is from an instance or not. Here's the problem: Within the class defi

Re: @classmethod question

2008-04-24 Thread Arnaud Delobelle
Scott SA <[EMAIL PROTECTED]> writes: A side note > class RecipieClass: Recipe is a more widespread spelling, I believe. Moreover it is the convention in python that only class names are capitalized, so you don't need to append a 'Class'. class Recipe: ... clafoutis = Recipe(

Re: @classmethod question

2008-04-24 Thread Bruno Desthuilliers
Scott SA a écrit : Hi, I'm using the @classemethod decorator for some convenience methods and for some reason, either mental block or otherwise, can't seem to figure out how to elegantly detect if the call is from an instance or not. Well, the point is that a classmethod *always* receive the cla

Re: @classmethod question

2008-04-23 Thread Gabriel Genellina
En Thu, 24 Apr 2008 00:27:13 -0300, Scott SA <[EMAIL PROTECTED]> escribió: I'm using the @classemethod decorator for some convenience methods and for some reason, either mental block or otherwise, can't seem to figure out how to elegantly detect if the call is from an instance or not. Here'

Re: @classmethod question

2008-04-23 Thread Ivan Illarionov
On 24 апр, 07:27, Scott SA <[EMAIL PROTECTED]> wrote: > Hi, > > I'm using the @classemethod decorator for some convenience methods and for > some reason, either mental block or otherwise, can't seem to figure out how > to elegantly detect if the call is from an instance or not. > > Here's the pro