Brett Cannon: Abstract Base Classes PEP accepted

by jesse in ,

Brett Cannon: Abstract Base Classes PEP accepted ABCs are one of the cooler things (in my opinion) that are coming in Python 3k - however, I know that there's many people who have problems with the proposed implementation. (Brett points out PEP 3133 which is the Roles proposal).

Right now - I personally like the ABC approach - it's flexible (minimalist) and will not get in your way if you don't want/need it (one of Pythons biggest draws for me). Obviously we'll see how it stacks up in implementation - it could simply be that I don't know/understand enough about the alternatives to "know any better".

I'm about to seriously start digging my teeth into Java programming (while I continue on my Python path, nooch) and one of the key things the Java guys and I talk about with some regularity is the notion of static interfaces and types.

There is something nice about static types and static interfaces - you always know what you're getting and expecting. The problem with that of course, is that the guy who wrote the object to begin with has to account for every use of the object.

Of course: that's a plus in a large code base with a large team. I instinctively pull back from the concept of those handcuffs - how do you know what I need to do with that object? Why not let me change it/alter it dynamically?

I'm sure we're going to see more about ABCs in the coming months. Meanwhile - I'll continue to learn. I like doing that.

Random thought of the day: How early can you start teaching a kid Python?

(Via Brett Cannon.)