Python: check if an object is a sequence

iter(x) will raise a TypeError if x cannot be iterated on — but that check “accepts” sets and dictionaries, though it “rejects” other non-sequences such as None and numbers. On the other hands, strings (which most applications want to consider “single items” rather than sequences) are in fact sequences (so, any test, unless specialcased for … Read more

In Clojure, when should I use a vector over a list, and the other way around?

Once again, it seems I’ve answered my own question by getting impatient and asking it in #clojure on Freenode. Good thing answering your own questions is encouraged on Stackoverflow.com 😀 I had a quick discussion with Rich Hickey, and here is the gist of it. [12:21] <Raynes> Vectors aren’t seqs, right? [12:21] <rhickey> Raynes: no, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)