Avatar

decivex

decivex@yiffit.net
Joined
0 posts • 43 comments
Direct message

In what way is it less effort than vim? I’ve tried helix a little bit and it didn’t seem that different.

permalink
report
parent
reply

I know I’m being somewhat pedantic but range() returns an iterable range type, not a list, in python 3.

permalink
report
parent
reply
  1. list.append returns None so what you’ve actually got is a list comprehension that generates a list containing the value None 19 times. (using functions with side effects, such as list.append, in list comprehensions are generally bad style so you should avoid this)
  2. The list[...] syntax retrieves elements from the list, which is not what you’re trying to do here. (and it is actually invalid syntax in this case)
  3. You should generally avoid calling lists list, because list is already a builtin.

If you want to append the numbers 1 to 19 to a list as you’re trying to do you can call the list.extend function with the list comprehension [value for value in range(1, 20)] as the argument. (Although in this case you can also just use the range directly.) To do it without list comprehensions you can simply loop over the range and repeatedly call the append function.

permalink
report
reply

I think they weren’t asking for an idea that would actually make the world a better place but rather one that somebody on some level believes would make the world a better place. Hence it still being a stupid idea.

permalink
report
parent
reply

It’s not a paper, it’s a stream-of-consciousness style blog post.

permalink
report
parent
reply

Ah yes, newsweek. Truly a paragon of human rights advocacy.

permalink
report
reply

Pretty sure 5 is Artemis Fowl.

permalink
report
parent
reply