Coding standard: Prefixing variables to indicate datatype
Daniel Dittmar
daniel at dittmar.net
Sat Jan 18 19:01:58 EST 2003
Terry Reedy wrote:
> "Daniel Dittmar" <daniel at dittmar.net> wrote in message
>
>>Now that there are class methods, there's no longer the need to force
>>this into a instance method call. str.join (somelist [, joinstring])
>>does the job just fine.
>
> Nope.
> str.join is *not* a class method. (If it were, joiner.join(seq) would
> not work!). While not identified as 'unbound', it acts like a normal
> instance methods. So you have the parameter order backwards.
I meant it *should* be a class method with str being the class, join
being the method and somelist and joinstring being the arguments. I was
opposing the idea that there are only the alternatives somelist.join
(joinstring) and joinstring.join (list). But of course if
joinstring.join (somelist) is intuitive.
Daniel
More information about the Python-list
mailing list