Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #63279 > unrolled thread

Re: function to split strings and lists on predicate

Started byDave Angel <davea@davea.name>
First post2014-01-06 08:35 -0500
Last post2014-01-06 08:35 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: function to split strings and lists on predicate Dave Angel <davea@davea.name> - 2014-01-06 08:35 -0500

#63279 — Re: function to split strings and lists on predicate

FromDave Angel <davea@davea.name>
Date2014-01-06 08:35 -0500
SubjectRe: function to split strings and lists on predicate
Message-ID<mailman.5014.1389015242.18130.python-list@python.org>
On Mon, 06 Jan 2014 06:48:11 +0000, Mark Lawrence 
<breamoreboy@yahoo.co.uk> wrote:
> I came across this over the weekend 
> 
http://paddy3118.blogspot.co.uk/2013/10/unifying-pythons-string-and-lis
t.html. 
>   I couldn't come up with a solution to the fsplit function that 
seemed 
> in any way cleaner.  What can our nest of avid Pythonistas come up 
with?

Looks like that link is already broken.  Try the first half of page:

http://paddy3118.blogspot.co.uk/2013_10_01_archive.html

I can't see any way to simplify the generator Paddy produced,  but 
the thing that bothered me is that it won't work on iterables, such 
as itself. For thar reason I think I'd stick with the separate 
functions,  or write an adaptor to convert a iterable of lists to one 
of strings.

-- 
DaveA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web