[Tutor] On New Style Classes

Crabtree, Chad Chad.Crabtree at nationalcity.com
Thu Apr 15 09:25:31 EDT 2004


Well I guess that my post was superflous.  I just felt that the syntax for
the classmethod and static methods where just wierd.  In addition it doesn't
seem like they are needed because in the past it just seemed that you would
put the function in a module which for all intents looks like a class.  It
just isn't clear to me how this feature improves objects or how they are
used.

-----Original Message-----
From: Alan Gauld [mailto:alan.gauld at blueyonder.co.uk]
Sent: Thursday, April 15, 2004 3:14 AM
To: Crabtree, Chad; tutor at python.org
Subject: Re: [Tutor] On New Style Classes


> event oriented programing.  However class methods and static classes
don't
> really make sence to me.  They seem to be a syntatictic kludge.  I
know what
> they are but not why python needs them.

I'm confused by this statement. Python needs class methods for
the same reason other OO languages need them - to implement
class behaviour and enable metaclass style programming. That is,
to implement behaviour that is common to all instances of the
class or that can be invoked without an instance in existence.

Why would Python not need such capability?

Alan G.


-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------

This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s).  If this
communication is received in error, please contact the sender and delete this
communication.
===========================================================================================



More information about the Tutor mailing list