|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
whitespace in GetPaid?I should be polite and ask: my typing habits and editor settings typically lead me to produce PEP-8 code, but most of GetPaid seems to use a quite different whitespace-heavy set of conventions like this: def ContentTypes( context ): portal_types = getToolByName( context.context, 'portal_types' ) instead of PEP-8 code like this: def ContentTypes(context): portal_types = getToolByName(context.context, 'portal_types') Is the extra whitespace something desirable in Plone-land that I should carefully try to imitate in my own code that I'm adding? Or can my own additions be PEP-8 without making the code too difficult to read? -- Brandon Craig Rhodes brandon@... http://rhodesmill.org/brandon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to getpaid-dev@... To unsubscribe from this group, send email to getpaid-dev+unsubscribe@... For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: whitespace in GetPaid?Good comment. I use PEP-8, and I'd suggest that PEP-8 is really the right way to go for the future regardless of the existing codebase. I'm not certain who originally coded with the extra-whitespace-style (Kapill?) but for consistency with the rest of Plone etc and the Python multiverse, PEP-8 is the way to go.
D On Thu, Aug 20, 2009 at 9:54 AM, Brandon Craig Rhodes <brandon@...> wrote:
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to getpaid-dev@... To unsubscribe from this group, send email to getpaid-dev+unsubscribe@... For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: whitespace in GetPaid?On Aug 19, 2009, at 2:54 PM, Brandon Craig Rhodes wrote: > I should be polite and ask: my typing habits and editor settings > typically lead me to produce PEP-8 code, but most of GetPaid seems to > use a quite different whitespace-heavy set of conventions like this: > > def ContentTypes( context ): > portal_types = getToolByName( context.context, 'portal_types' ) > > instead of PEP-8 code like this: > > def ContentTypes(context): > portal_types = getToolByName(context.context, 'portal_types') > > Is the extra whitespace something desirable in Plone-land that I > should > carefully try to imitate in my own code that I'm adding? Or can my > own > additions be PEP-8 without making the code too difficult to read? +1 for PEP-8. With one exception however -- Plone code tends to use camelCase method names rather than names with an underscore, in order to be consistent with most of Zope. I haven't seen the extra whitespace used elsewhere, though. David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to getpaid-dev@... To unsubscribe from this group, send email to getpaid-dev+unsubscribe@... For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: whitespace in GetPaid?On Thu, Aug 20, 2009 at 9:54 AM, Brandon Craig Rhodes<brandon@...> wrote: > > I should be polite and ask: my typing habits and editor settings > typically lead me to produce PEP-8 code, but most of GetPaid seems to > use a quite different whitespace-heavy set of conventions like this: > > def ContentTypes( context ): > portal_types = getToolByName( context.context, 'portal_types' ) > > instead of PEP-8 code like this: > > def ContentTypes(context): > portal_types = getToolByName(context.context, 'portal_types') > > Is the extra whitespace something desirable in Plone-land that I should > carefully try to imitate in my own code that I'm adding? Or can my own > additions be PEP-8 without making the code too difficult to read? My interpretation is that is the personal style of the original contributor to GetPaid. I think in the past I have tried to stick with whatever the current style of the file that I'm patching. As trivial as that sounds it does take some mental effort. I'd be happy to see the code base be PEP-8'ified in respect to white space handling. -- Michael Dunstan - http://www.elyt.com/michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "getpaid-dev" group. To post to this group, send email to getpaid-dev@... To unsubscribe from this group, send email to getpaid-dev+unsubscribe@... For more options, visit this group at http://groups.google.com/group/getpaid-dev?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |