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
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
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
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
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
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(
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
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'
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
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 definition, 'isinstance' has nothing to
co
Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes:
> Mike Meyer wrote:
>>Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes:
>>>Is it possible to tell, which instance was used to call the
>>>classmethod that is currently running?
>>Ok, I read through what got to my nntp server, and I'm still
>>completely conf
Mike Meyer wrote:
>Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes:
>
>
>>Is it possible to tell, which instance was used to call the
>>classmethod that is currently running?
>>
>>
>
>Ok, I read through what got to my nntp server, and I'm still
>completely confused.
>
>A class method isn't nece
Laszlo Zsolt Nagy <[EMAIL PROTECTED]> writes:
> Is it possible to tell, which instance was used to call the
> classmethod that is currently running?
Ok, I read through what got to my nntp server, and I'm still
completely confused.
A class method isn't necessarilry called by an instance. That's wh
Laszlo Zsolt Nagy wrote:
> In my methods, most code is about string manipulation and calling other
> classmethods.
> There are only a few places where I can use an instance, but it is not
> required.
> I would like to reuse as most code as possible, so I do not want to
> create two different
> m
Hello Steven,
I already implemented this using the form
@classmethod
def methodname(cls,other_params,self=None)
but your example code looks so neat! This is exactly what I needed. :-)
In my methods, most code is about string manipulation and calling other
classmethods.
There are only a few
Laszlo Zsolt Nagy wrote:
>
> Hello,
>
> Is it possible to tell, which instance was used to call the classmethod
> that is currently running?
>
[snip]
>
> processor = SQLProcessors.StdOutProcessor() # Print to stdout
> PostgreSQLConnection.process_create_tables(processor,dbdef) # This
> soul
Hello,
Is it possible to tell, which instance was used to call the classmethod
that is currently running?
Background: I have a class called DatabaseConnection and it has a
classmethod called process_create_tables. This method should create some
database tables defined by a database definiti
17 matches
Mail list logo