[FRPythoneers] Question about string.join method
J. Wayde Allen
wallen at its.bldrdoc.gov
Tue May 1 10:50:36 MDT 2001
> Python encourages many practitioners to believe that
> the processor itself is the most convenient reference.
> Do you realize you can
> >>> from string import join
> >>> join.__doc__
> 'join(list [,sep]) -> string\012joinfields(list [,sep]) -> string\012\012Return
> a string composed of the words in list, with\012intervening occurences of sep.
> Sep defaults to a single\012space.\012\012(join and joinfields are synonymous)'
No ... can't say I knew this. If I had read about it at one time I
obviously forgot about it. Thanks!
I am a bit curious though. I'm guessing that the \012 is the ASCII code
for a dot? Why is it displayed this way in the documentation?
While we're at it, I'm assuming that a "good" Python programmer would
include the __doc__ feature into his or her code? Is there a
"standard" way to do this or does one just define
self.__doc__ = "Some string of instructions"
(wallen at its.bldrdoc.gov)
More information about the FRPythoneers