[Python-Dev] Changes to PEP 327: Decimal data type (original) (raw)
Robert Brewer fumanchu at amor.org
Wed Mar 17 16:23:44 EST 2004
- Previous message: [Python-Dev] Changes to PEP 327: Decimal data type
- Next message: [Python-Dev] Re: [Python-checkins] python/dist/src/Objects dictobject.c, 2.153, 2.154
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Michael Chermside wrote:
Oren writes: > > Decimal.fromFloat(floatNumber, positions) > > +1 on the behavior. One nitpick about the method name: this caseConvention > is not consistent with the Python Style Guide (PEP 8)
It IS consistant as I read it: > Function Names > > Plain functions exported by a module can either use the CapWords > style or lowercase (or lowercasewithunderscores). There is > no strong preference, but it seems that the CapWords style is > used for functions that provide major functionality > (e.g. nstools.WorldOpen()), while lowercase is used more for > "utility" functions (e.g. pathhack.kosroot()). I interpret that to mean that CapWords (fromFloat) is a perfectly valid style for method names. If I'm mis-interpreting it, please let me know.
Only that CapWords in PEP 8 seems to be distinct from mixedCase, where the first character is lowercase (I think that's what Oren meant). So "fromFloat" (mixedCase) should be "FromFloat" (CapWords) or "from_float" (lower_case_with_underscores).
However, you're bang on about rampant deviation. Probably too late in the game to do anything about it with existing core code. :(
Robert Brewer MIS Amor Ministries fumanchu at amor.org
- Previous message: [Python-Dev] Changes to PEP 327: Decimal data type
- Next message: [Python-Dev] Re: [Python-checkins] python/dist/src/Objects dictobject.c, 2.153, 2.154
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]