Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29826
| From | Dennis Lee Bieber <wlfraed@ix.netcom.com> |
|---|---|
| Subject | Re: Capitalization for variable that holds a class |
| Date | 2012-09-23 12:53 -0400 |
| Organization | > Bestiaria Support Staff < |
| References | <CAN1F8qUxbhK8HqRr7RVUQreb2QkAsm+Y9q0LKR0eK1akYbNsLg@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1129.1348419201.27098.python-list@python.org> (permalink) |
On Sun, 23 Sep 2012 16:48:38 +0100, Joshua Landau
<joshua.landau.ws@gmail.com> declaimed the following in
gmane.comp.python.general:
> Simple question:
>
> [myClass() for myClass in myClasses]
> vs
> [MyClass() for MyClass in myClasses]
>
The recommended naming scheme for Python is that class DEFINITIONS
begin capitalized. Instances, methods/attributes, functions begin
lowercase.
I abstain from the argument about camel-case vs _ (Ada "pretty
printers" automatically capitalize at _, so _ is common in Ada)
class MyClass(object):
def myMethod(self):
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Capitalization for variable that holds a class Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-09-23 12:53 -0400
csiph-web