Loading...

Python Infrequently Asked Questions

February 6, 2008 No Comments Tagged as: python

I've slowly been reading the Python IAQ, a compilation of "infrequently asked questions" for Python. This fascinated me when I first stumbled over it because I had just learned that prefixing a member attribute of an object with '__' made the attribute pseudo-private. I'd never used this idiom before, so I didn't know, and it only surfaced when I was trying to write unit tests for code that I hadn't actually written. My curiousity at what else I had been missing out on got the better of me, and I started reading the article a bit at a time compiling another project I'm working on.

Some of it I grew tired of, because it was trying to make Python into C/C++/Java/pick-your-favorite. One my favorite things about Python is its idioms and differences with other languages, so I wasn't thrilled about making Python look like Java. But after reading through those first few questions, I found quite a few little tricks, like implementing an abstract class in python, which I've always thought about. It uses a few neat little tricks in python to do things that otherwise wouldn't be simple.

It's a good read. Go read it. Do it. Do it now.

No comments have been posted yet. Be the first to leave a comment!

Leave a Comment