On 29.03.2016 18:05, Peter Otten wrote:
Reformatting it a bitString.Join( "\n", mylist.Where( foo => !String.IsNullOrEmpty(foo.description) ).Select( foo => foo.description)) this looks like a variant of Python's str.join( "\n", map(lambda foo: foo.description, filter(lambda foo: foo.description, mylist))) Assuming it's type-safe and can perhaps reshuffle the where and select part into something optimised there is definitely progress. But still, Python's generator expressions are cool..
Haha, sure. But don't get stuck there. Learn something new from time to time; even a new language.
Best, Sven -- https://mail.python.org/mailman/listinfo/python-list
