News for hackers. Stuff that matters.
Re:I don't like Python. Does that make me a bad person? by lars512 on Saturday June 26, 2010 @07:08PM (#1464474)
To complement what other people are recommending here, I'd say that in cases like this I only sometimes read the documentation. Other times I put a line in my code:

  import pdb; pdb.set_trace()
which makes it enter the debugger at that point, and I simply inspect the object that I'm really getting, looking at what it supports, the documentation on its methods, etc.

Doing it this way is not always feasible, since sometimes there's a prohibitive amount of setup code that needs running before you can get a real object. For short code paths though, like Django apps, it works really well.

There are no comments on this comment yet.