However, with Python being a dynamically typed language, refactoring is not so simple. Also the Civil project misses unit tests. What worked in the end was:
- Heavy usage of regular expressions to modify code that follows a certain naming structure to, for example, exchange arguments. I learned quite a lot there too.
- Starting the program again and again, doing the same stuff over and over and fixing runtime errors one by one, so next time it runs a bit further.
- Using a source versioning system and saving intermediate steps often (with Git I often amend commits to be able to revert uncommitted changes if needed) so one can go back if nothing else helps.
AttributeError: 'module' x has no attribute 'y'which mostly indicates that the variable has a different type of what people expected, which can have many different causes. Still, fixing things can be very satisfying. :)
No comments:
Post a Comment