Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #63279
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.004 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'seemed': 0.09; 'strings.': 0.09; 'jan': 0.12; 'itself.': 0.14; 'broken.': 0.16; 'iterable': 0.16; 'nest': 0.16; 'pythonistas': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'with?': 0.16; 'wrote:': 0.18; 'separate': 0.22; 'header:User- Agent:1': 0.23; 'stick': 0.24; 'mon,': 0.24; 'looks': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'lists': 0.32; "i'd": 0.34; "can't": 0.35; 'convert': 0.35; 'subject:lists': 0.35; 'but': 0.35; 'half': 0.37; 'weekend': 0.38; 'to:addr:python-list': 0.38; "couldn't": 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'such': 0.63; 'our': 0.64; 'url:blogspot': 0.65; 'url:co': 0.67; 'bothered': 0.68; 'url:2013': 0.84 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Dave Angel <davea@davea.name> |
| Subject | Re: function to split strings and lists on predicate |
| Date | Mon, 06 Jan 2014 08:35:34 -0500 |
| References | <ladjir$21h$1@ger.gmane.org> <ladjir$21h$1@ger.gmane.org> |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Gmane-NNTP-Posting-Host | dpc6744199211.direcpc.com |
| In-Reply-To | <ladjir$21h$1@ger.gmane.org> |
| User-Agent | Groundhog Newsreader for Android |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.5014.1389015242.18130.python-list@python.org> (permalink) |
| Lines | 24 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1389015242 news.xs4all.nl 2954 [2001:888:2000:d::a6]:49165 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:63279 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: function to split strings and lists on predicate Dave Angel <davea@davea.name> - 2014-01-06 08:35 -0500
csiph-web