Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #105990
| Path | csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!2.us.feeder.erje.net!newsfeed.xs4all.nl!newsfeed9.news.xs4all.nl!bcyclone05.am1.xlned.com!bcyclone05.am1.xlned.com!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | "Sven R. Kunze" <srkunze@mail.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: [OT] C# -- sharp or carp? was Re: Learning Python (or Haskell) makes you a worse programmer |
| Date | Tue, 29 Mar 2016 17:41:34 +0200 |
| Lines | 21 |
| Message-ID | <mailman.156.1459266104.28225.python-list@python.org> (permalink) |
| References | <56f9cffb$0$1614$c3e8da3$5496439d@news.astraweb.com> <nddigv$74u$1@ger.gmane.org> <56FA565A.9020800@mail.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de ES9oyQkEO7qBeDGNMl/g3gShEd0rsmkBeAtcGfCxpouQ== |
| Return-Path | <srkunze@mail.de> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.030 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'subject:: [': 0.03; 'subject:Python': 0.05; 'mylist': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Learning': 0.16; 'subject:programmer': 0.16; 'wrote:': 0.16; 'subject:] ': 0.19; 'bit': 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'skip:" 20': 0.26; 'equivalent': 0.27; 'question': 0.27; 'url:wikipedia': 0.29; 'url:wiki': 0.30; '"")': 0.33; 'foo': 0.33; 'skip:\xa0 20': 0.33; 'received:10.0': 0.34; 'best,': 0.35; 'mine': 0.35; 'quite': 0.35; 'something': 0.35; 'but': 0.36; 'url:org': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'url:en': 0.39; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'charset:windows-1252': 0.62; '8bit%:100': 0.70; 'friend': 0.81; 'otten': 0.84; 'subject:you': 0.85 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1459266100; bh=rJm0pR7FA//uZ0SMJpanorV0pzMhmIVk/8SAynsBpO4=; h=Subject:To:References:From:Date:In-Reply-To:From; b=EbJ4GPvgcqifbG4WpsiX98L+mOGAg8Wpfqw5Z8rsnvkyDLm6TG8NjLgMDzyfuEqtK NeWro23290XjfhSWJte3ep25s/zdnVj+lVIaHu3iVLj/yz817rshOD9AnZBoCo7LQW M/OIglNfgd3H/7F+Dq904+P5MfOfZ6tUN7g+xLhk= |
| In-Reply-To | <56FA565A.9020800@mail.de> |
| X-purgate | clean |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate-type | clean |
| X-purgate-Ad | Categorized by eleven eXpurgate (R) http://www.eleven.de |
| X-purgate | This mail is considered clean (visit http://www.eleven.de for further information) |
| X-purgate | clean |
| X-purgate-size | 2318 |
| X-purgate-ID | 154282::1459266100-00003BBD-04F1F84E/0/0 |
| X-Content-Filtered-By | Mailman/MimeDel 2.1.21 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| 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> |
| X-Received-Bytes | 3834 |
| X-Received-Body-CRC | 815876141 |
| Xref | csiph.com comp.lang.python:105990 |
Show key headers only | View raw
On 29.03.2016 12:18, Sven R. Kunze wrote:
> On 29.03.2016 11:39, Peter Otten wrote:
>> My question to those who know a bit of C#: what is the state-of-the-art
>> equivalent to
>>
>> "\n".join(foo.description() for foo in mylist
>> if foo.description() != "")
>>
>
> Using LINQ, I suppose:
> https://en.wikipedia.org/wiki/Language_Integrated_Query
Friend of mine told me something like this:
String.Join("\n", mylist.Where(foo =>
!String.IsNullOrEmpty(foo.description)).Select(foo => foo.description))
[untested, but from what I know of quite correct]
Best,
Sven
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Learning Python (or Haskell) makes you a worse programmer Steven D'Aprano <steve@pearwood.info> - 2016-03-29 11:44 +1100
Re: Learning Python (or Haskell) makes you a worse programmer Ethan Furman <ethan@stoneleaf.us> - 2016-03-28 21:05 -0700
Re: Learning Python (or Haskell) makes you a worse programmer Michael Torrie <torriem@gmail.com> - 2016-03-28 22:13 -0600
[OT] C# -- sharp or carp? was Re: Learning Python (or Haskell) makes you a worse programmer Peter Otten <__peter__@web.de> - 2016-03-29 11:39 +0200
Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-29 12:05 +0200
Re: [OT] C# -- sharp or carp? was Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-29 12:18 +0200
Re: [OT] C# -- sharp or carp? was Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-29 17:41 +0200
Re: [OT] C# -- sharp or carp? was Re: Learning Python (or Haskell) makes you a worse programmer Peter Otten <__peter__@web.de> - 2016-03-29 18:05 +0200
Re: [OT] C# -- sharp or carp? was Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-29 18:11 +0200
Re: [OT] C# -- sharp or carp? was Re: Learning Python (or Haskell) makes you a worse programmer Vito De Tullio <vito.detullio@gmail.com> - 2016-03-29 23:36 +0200
Re: Learning Python (or Haskell) makes you a worse programmer "Eric S. Johansson" <esj@harvee.org> - 2016-03-29 19:29 -0400
Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-30 12:07 +0200
Re: Learning Python (or Haskell) makes you a worse programmer BartC <bc@freeuk.com> - 2016-03-30 11:21 +0100
Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-30 13:43 +0200
Re: Learning Python (or Haskell) makes you a worse programmer "Eric S. Johansson" <esj@harvee.org> - 2016-03-30 09:06 -0400
Re: Learning Python (or Haskell) makes you a worse programmer Chris Angelico <rosuav@gmail.com> - 2016-03-31 00:09 +1100
Re: Learning Python (or Haskell) makes you a worse programmer "Eric S. Johansson" <esj@harvee.org> - 2016-03-30 09:37 -0400
Re: Learning Python (or Haskell) makes you a worse programmer Tim Golden <mail@timgolden.me.uk> - 2016-03-30 11:14 +0100
Re: Learning Python (or Haskell) makes you a worse programmer Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-03-31 10:36 +1300
Re: Learning Python (or Haskell) makes you a worse programmer Travis Griggs <travisgriggs@gmail.com> - 2016-03-31 09:30 -0700
Re: Learning Python (or Haskell) makes you a worse programmer Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-31 10:34 -0600
Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-31 18:44 +0200
Re: Learning Python (or Haskell) makes you a worse programmer "Sven R. Kunze" <srkunze@mail.de> - 2016-03-30 12:23 +0200
csiph-web