The fact that Python has truly excellent handling of data types and is astonishingly object oriented can be an incredible boon for the programmer. However, it can be mind-bending to someone trying to figure code which turns out to be iterating through a list of Class, Function pairs and creating an instantiation of each Class and calling the Function using that one of that instance’s members as an argument–all in a single line less than 80 characters long. The fact that things like this are common in this codebase means that deciphering the code takes a while.
Of course, I brought this upon myself–I wrote this code while I was in Japan. I didn’t document it because it’s pretty easy to understand, once you work out what’s going on. It’s just that to a reader unfamiliar with the code, all they see on the first few readthroughs is the blackest of magic.
No comments yet.