Hacker News new | ask | show | jobs
by swannodette 5686 days ago
I'm just glad that Clojure has a good community driven documentation site that's approachable for newcomers. As far Python documentation goes I've never considered it particularly useful.

For me, the best kind of documentation is self-documentation. I love dir and the various forms of introspection at the Python interpreter. However, the Clojure REPL story, being a Lisp, just makes the Python interactive introspection experience look pathetic.

The thing about interactive documentation is that I, at least, find it much more likely that I'll remember it. When I just read something it tends to be forgotten shortly thereafter.

1 comments

> However, the Clojure REPL story, being a Lisp, just makes the Python interactive introspection experience look pathetic.

Have you ever used ipython? Can you give an example of how it pales in comparison? Typing dir() or help() sounds awful, I hope no full-time Python developers do that.

    import csv
    csv.<tab>
Blammo, tab completed dir().

    csv.reader?
Blammo, docstring, method signature, and more.

    csv.reader??
Blammo, code for the method.
I have used ipython. How do you easily reload arbitrarily nested modules? How do you easily redefine only one function in some module and have that change be reflected globally?
What has that got to do with introspection?