> module = imp.load_module(path, file, filename, smt) > > After returning from imp.load_module(), the file paramter passed in > may be at the beginning or end depending on whether it was byte > compiled. If the file was already compiled, the file returned will > stay at the beginning. If the file was byte compiled in > load_module(), the file will be at the end. This certainly doesn't surprise me -- in one case it read the source and in the other case it didn't read the source. If you pass a file to a function, I don't think that there is any guarantee to the file position when it returns, so I don't think this should be documented. I can't think of why you'd expect it to be at any specific position. --Guido van Rossum (home page: http://www.python.org/~guido/)
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