Paulo da Silva wrote:
Em 23-08-2010 04:30, James Mills escreveu:
On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva
wrote:
I understand the concept of a static method.
However I don't know what is a class method.
Would anybody pls. explain me?
Please read this first:
http://docs.
John,
I agree with you and I also think the definition given on the official
python site is somewhat confusing, at least for an engineer like myself.
But I'll take a stab at explaning it using what I know thus far.
I think to understand what a class method is you have to first understand
wha
Em 23-08-2010 06:16, Ian Kelly escreveu:
> On Sun, Aug 22, 2010 at 9:53 PM, Paulo da Silva
> wrote:
>> Em 23-08-2010 04:30, James Mills escreveu:
>>> On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva
>>> wrote:
I understand the concept of a static method.
However I don't know what is a c
On 8/22/2010 9:16 PM, James Mills wrote:
On Mon, Aug 23, 2010 at 1:53 PM, Paulo da Silva
wrote:
I did it before posting ...
The "explanation" is not very clear. It is more like "how to use it".
Without going into the semantics of languages basically the
differences are quite clear:
@classme
On 8/22/2010 11:53 PM, Paulo da Silva wrote:
Please read this first:
http://docs.python.org/library/functions.html#classmethod
Then ask us questions :)
I did it before posting ...
When you ask a question, it help people answer if they know what you
have already tried and failed with ;-)
On Sun, Aug 22, 2010 at 9:53 PM, Paulo da Silva
wrote:
> Em 23-08-2010 04:30, James Mills escreveu:
>> On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva
>> wrote:
>>> I understand the concept of a static method.
>>> However I don't know what is a class method.
>>> Would anybody pls. explain me?
>>
On Mon, Aug 23, 2010 at 1:53 PM, Paulo da Silva
wrote:
> I did it before posting ...
> The "explanation" is not very clear. It is more like "how to use it".
Without going into the semantics of languages basically the
differences are quite clear:
@classmethod is a decorator that warps a function
Em 23-08-2010 04:30, James Mills escreveu:
> On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva
> wrote:
>> I understand the concept of a static method.
>> However I don't know what is a class method.
>> Would anybody pls. explain me?
>
> Please read this first:
> http://docs.python.org/library/fun
On Mon, Aug 23, 2010 at 12:49 PM, Paulo da Silva
wrote:
> I understand the concept of a static method.
> However I don't know what is a class method.
> Would anybody pls. explain me?
Please read this first:
http://docs.python.org/library/functions.html#classmethod
Then ask us questions :)
cheer
On Sat, 08 Mar 2008 09:52:41 -0800, castironpi wrote:
> On Mar 7, 6:16 am, Steven D'Aprano <[EMAIL PROTECTED]
> cybersource.com.au> wrote:
>> On Thu, 06 Mar 2008 08:40:47 -0800, castironpi wrote:
>> > you
>> > could say exec( open( 'modA.py' ).read() ) ==> import modA
>>
>> Yes, you could say that
On Mar 7, 6:16 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Thu, 06 Mar 2008 08:40:47 -0800, castironpi wrote:
> > you
> > could say exec( open( 'modA.py' ).read() ) ==> import modA
>
> Yes, you could say that, but you'd be wrong. Please test your code before
> making such
On Thu, 06 Mar 2008 08:40:47 -0800, castironpi wrote:
> you
> could say exec( open( 'modA.py' ).read() ) ==> import modA
Yes, you could say that, but you'd be wrong. Please test your code before
making such claims in the future.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-li
En Thu, 06 Mar 2008 14:40:47 -0200, <[EMAIL PROTECTED]> escribi�:
> On Mar 6, 12:17 am, "Daniel Fetchinson" <[EMAIL PROTECTED]>
> wrote:
>>
>> > What does exec( open( 'modA.py' ).read() ) do?
>>
>
> A more appropriate formulation of the 'question behind the words'
> would have been, 'are there any
On Mar 6, 1:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Mar 5, 7:50 pm, [EMAIL PROTECTED] wrote:
>
> > What is a class that is not a module?
>
> A class is a bag of stuff and a namespace :)
>
> J.
A module is a bag of stuff and a namespace. Different stuff.
{ '__module__', '__weak
On Mar 5, 7:50 pm, [EMAIL PROTECTED] wrote:
> What is a class that is not a module?
A class is a bag of stuff and a namespace :)
J.
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 6, 12:17 am, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:
> > > Where to begin?
>
> > What does exec( open( 'modA.py' ).read() ) do?
>
> The most appropriate list to ask those questions is:
>
> http://mail.python.org/mailman/listinfo/tutor
Thanks for the reference. I'm basically experien
[EMAIL PROTECTED] a écrit :
> And white to play. What does exec( open( 'modA.py' ).read() ) do?
RTFM
--
http://mail.python.org/mailman/listinfo/python-list
> > Where to begin?
>
> What does exec( open( 'modA.py' ).read() ) do?
The most appropriate list to ask those questions is:
http://mail.python.org/mailman/listinfo/tutor
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 8:06 pm, [EMAIL PROTECTED] wrote:
> On Mar 5, 4:25 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> > > Classes and modules are really similar. In Python they're really
> > > *really* similar.
>
> > Yes they
On Mar 5, 4:25 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> > Classes and modules are really similar. In Python they're really
> > *really* similar.
>
> Yes they are.
>
> Both are namespaces. The very last line of the Z
On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> Classes and modules are really similar. In Python they're really
> *really* similar.
Yes they are.
Both are namespaces. The very last line of the Zen of Python says:
>>> import this
...
Namespaces are one honking great idea -- let's do mo
On Mar 5, 3:58 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 10:50:12 -0800, castironpi wrote:
> > What is a class that is not a module?
>
> Er, all of them?
>
> I'm curious what classes you think are modules.
>
> --
> Steven
Thank you for your time in ent
On Mar 5, 3:49 pm, [EMAIL PROTECTED] wrote:
>
> Classes and modules are really similar. In Python they're really
> *really* similar.
>
> Actually, at this point, that observation may have more of a
> subjective component than I'm used to asserting. I pause here for
> corroboration and others' per
You import classes from modules.
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 05 Mar 2008 10:50:12 -0800, castironpi wrote:
> What is a class that is not a module?
Er, all of them?
I'm curious what classes you think are modules.
--
Steven
--
http://mail.python.org/mailman/listinfo/python-list
> > > > What is a class that is not a module?
>
> > I'm willing to address convention, in serial or parallel--- (change
> > subject to 'what goes on newsgroups'?), but it's not clear from fact
> > what assumption who has made.
>
> Since you did not elaborate on what your efforts were and the extent
On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
> What is a class that is not a module?
Why is a raven like a writing desk?
As for Python class information, I would recommend reading the
following sites:
http://docs.python.org/tut/node11.html
http://www.diveintopython.org/object_oriented_framework/
On Mar 5, 2:04 pm, [EMAIL PROTECTED] wrote:
> On Mar 5, 1:29 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
>
> > On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
>
> > > What is a class that is not a module?
>
> > Please stop posting these one-liner beginner questions. If you can
> > type it in one line
On Mar 5, 1:29 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
>
> > What is a class that is not a module?
>
> Please stop posting these one-liner beginner questions. If you can
> type it in one line, you can enter it on the Google.com or Ask.com
> query
On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
> What is a class that is not a module?
Please stop posting these one-liner beginner questions. If you can
type it in one line, you can enter it on the Google.com or Ask.com
query page and get a wealth of *existing* information, from tutorials,
documen
30 matches
Mail list logo