Message info
 
To:python-ideas From:anatoly techtonik Subject:[Python-ideas] [...].join(sep) Date:Sat, 12 May 2012 11:21:17 +0300
 

I am certain this was proposed many times, but still - why it is rejected?

"real man don't use spaces".split().join('+').upper()
instead of
'+'.join("real man don't use spaces".split()).upper()


The class purity (not being dependent from objects of other class) is
not an argument here:
string.join() produces list, why list.join() couldn't produce strings?

The impedance mismatch can be, but it is a pain already and
string.join() doesn't help:
that means you still get exception when trying to join lists with
no strings inside


Can practicality still beat purity in this case?
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
http://mail.python.org/mailman/listinfo/python-ideas