Lambdairc – Experiment using Python without statements
github.com1 pointsby blossoms0 comments
TypeError: list indices must be integers, not list alist = [foo(word) for word in words if word.startswith('a')]
alist = map(foo, filter(lambda word: word.startswith('a'), words))
Which reads better? $ dd bs=1m count=10 if=/dev/random of=randomdata
10+0 records in
10+0 records out
10485760 bytes transferred in 0.878533 secs (11935535 bytes/sec)
$ python stdin_to_stdout.py < randomdata | cmp - randomdata
$ echo $?
0
EDIT2: I think I know how you came to the conclusion my code is wrong. Perhaps next time you should read the __entire__ post. Thank you. $ printf 'binarydata'|awk '{ print }'|hexdump -C
00000000 62 69 6e 61 72 79 64 61 74 61 0a |binarydata.|
0000000b