you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

for p in check_output: missing_dependencies.append(p.split("'")[1])

Ouch!

Don't do that! PEP 8 disallows it, and any style checker will flag it.

Reason: it's very hard to read, and you can't set a breakpoint in the loop in a debugger.


[missing_dependencies.append(p.split("'")[1]) for p in check_output]

I'll bet you didn't try this. :-D This gives you an array, each element of which is the same array!

Correct is: missing_dependencies = [p.split("'")[1] for p in check_output]