Re: PEP 8 example of 'Function and method arguments'

2006-03-14 Thread Martin P. Hellwig
Steven, Bruno, Terry & Duncon, thank you for your insights, it really helped me a great deal. -- mph -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP 8 example of 'Function and method arguments'

2006-03-14 Thread Duncan Booth
Terry Hancock wrote: > So far, the only time I've ever encountered this is with the > __new__ method, which, being a classmethod, needs "cls" > (which gets loaded with the *class* not the *instance*). > The __new__ method isn't actually a classmethod. In http://www.python.org/2.2.3/descrintro.h

Re: PEP 8 example of 'Function and method arguments'

2006-03-13 Thread Terry Hancock
On Mon, 13 Mar 2006 17:18:16 +0100 "Martin P. Hellwig" <[EMAIL PROTECTED]> wrote: > While I was reading PEP 8 I came across this part: > > """ > Function and method arguments > Always use 'self' for the first argument to instance > methods. Always use 'cls' for the first argument to >

Re: PEP 8 example of 'Function and method arguments'

2006-03-13 Thread bruno at modulix
Martin P. Hellwig wrote: > While I was reading PEP 8 I came across this part: > > """ > Function and method arguments >Always use 'self' for the first argument to instance methods. >Always use 'cls' for the first argument to class methods. > """ > > Now I'm rather new to programming and u

Re: PEP 8 example of 'Function and method arguments'

2006-03-13 Thread Steven Bethard
Martin P. Hellwig wrote: > While I was reading PEP 8 I came across this part: > > """ > Function and method arguments >Always use 'self' for the first argument to instance methods. >Always use 'cls' for the first argument to class methods. > """ > > Now I'm rather new to programming and u

PEP 8 example of 'Function and method arguments'

2006-03-13 Thread Martin P. Hellwig
While I was reading PEP 8 I came across this part: """ Function and method arguments Always use 'self' for the first argument to instance methods. Always use 'cls' for the first argument to class methods. """ Now I'm rather new to programming and unfamiliar to some basic concepts of OOP.