Dead link
14 karma · joined September 28, 2013
(That sentence I wrote about using hashable types need not apply, sorry!)
If you ran that code, you would get this error:
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?Not to mention Apple sells region-specialized units just like every other major computer retailer.
Could you elaborate? I want to understand how to fix it.
EDIT: I really want to know what is wrong with my code. It works. Is it a stylistic concern?
$ 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.|
0000000bIs this a common mistake?
Why you might ask? Well ask any kid who has been forced off to Bible Camp or some other humiliating childhood summer activity.
Keep up the great work!