Phillip Eby: > Yes it is, actually. You can answer the "print foo" question simply by > inspecting the code of the function that contains it. (And if it's not > in a function, you know it's a global, unless it's never assigned, in > which case it's a builtin.) > > But the "import foo" question cannot be answered by referring to the > source of the module in which it occurs. Bernhard Herzog: > Of course it's different, but it's not all that much different. To > determine whether an import is relative or not you look into the > directory containing the module with the import statement. Shouldn't be > more than a few keystrokes in a decent editor. On the contrary, I find a big difference between something which can be learned by inspecting the source and something which requires access to the filesystem the source is running on. Many times that filesystem isn't even available: "Susan emailed me this module she uses to fnob large datasets, and I can't understand why it isn't working for me!" -- Michael Chermside
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4