Feb 08, 2012 03:34
I got a grip today on abstract base classes, or ABCs, while I was stumbling upon the data model details of Python class implementation. I learned how to implement my Map class to serve all the functions of a built-in dictionary, so it should be much more straightforward to use for Python developers. If there's one thing I want to achieve with the SLE, it's a tight API.
What's an API, you ask? Application programming interface, basically the specification of how programs are supposed to use and properly extend the functionality of the code in the package, i.e. the specification of how to interface with the package. Important for any programmer to know. It's why I've had to do so much research and double-checking nonstop on Python's API itself.
I also want to future-proof the SLE code as much as I can, because there are no guarantees at this point that Python will carry forward all of its current functionality in future versions. ABCs weren't a part of the Python API in the past, but since they've introduced them now, I'd like to be on board. It's all cleaner this way anyway.
The other thing I did today was get down to work on the maps module exceptions. An exception is what's called up when the program detects an error of some sort. In Python programming it's a key aspect. So I want to be sure I do it with reasonable rigour. That said, there's time.
Sleepy.
soulthieves labyrinth engine