[Python-Dev] Re: [Python-Dev] Re: [Python-Dev] Re: [Python-Dev] String methods... finally

Greg Ward gward at cnri.reston.va.us
Tue Jun 15 17:41:39 CEST 1999


On 15 June 1999, Jack Jansen said:
> > The same should happen as for L"foo" + " " + L"bar".
> 
> This is probably the most reasonable solution. Unfortunately it breaks Marks 
> truly novel suggestion that 0.join(1, 2) becomes 102, but I guess we'll have 
> to live with that:-)

Careful -- it actually works this way in Perl (well, except that join
isn't a method of strings...):

$ perl -de 1
[...]
  DB<2> $sep = 0

  DB<3> @list = (1, 2)

  DB<4> p join ($sep, @list)
102

Cool!  Who needs type-checking anyways?

       Greg
-- 
Greg Ward - software developer                    gward at cnri.reston.va.us
Corporation for National Research Initiatives    
1895 Preston White Drive                           voice: +1-703-620-8990
Reston, Virginia, USA  20191-5434                    fax: +1-703-620-0913




More information about the Python-Dev mailing list