On 2019-07-21 12:02:27 +1200, DL Neil wrote: > What do you do to (respecting purism) ensure 'everything' (necessary) is > imported (and nothing more), preferably without relying upon (faulty, in my > case) human-memory or reading through volumes of code/documentation?
I write tests (not as consistently as I would like). I don't think there is much more you can do. The problem is that Python doesn't have variable declarations, so there is no reliable way to discover an undefined symbol except by executing the line where it is used. An IDE might help. Even though the problem is in general not solvable, most uses of symbols fall into a few common categories which can be discovered by static analysis. So an IDE (or even a syntax-highlighting editor) could flag all symbols where it can't find the definition. hp -- _ | Peter J. Holzer | we build much bigger, better disasters now |_|_) | | because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>
signature.asc
Description: PGP signature
-- https://mail.python.org/mailman/listinfo/python-list