Message150984
I'm not suggesting two stat calls (in the general case); you would call one or the other depending on the magic number of the pyc file.
Anyway, it would probably be best to have some method that is expected to return a specific object which embodies all the desired information for bytecode generation (and if you encompass source code with this object then you can get rid of get_source() as well). But it shouldn't be a raw stat object since not all bits of information will come from a stat call (eg. storing bytecode in a sqlite3 database) and thus require bogus data. If you want to move towards that kind of API I can support that.
As for path_mtime() returning an int instead of some number that can be converted to an int, that's because I didn't plan for the "Antoine wants to muck with the .pyc format" contingency (IOW I just didn't think about it). =) It wouldn't be a big deal to change the API to take a keyword-only argument specifying you want the highest resolution number instead of specifically an int. |
|
Date |
User |
Action |
Args |
2012-01-09 22:18:09 | brett.cannon | set | recipients:
+ brett.cannon, barry, ncoghlan, pitrou, Arfrever, neologix, python-dev, eric.snow |
2012-01-09 22:18:09 | brett.cannon | set | messageid: <1326147489.6.0.0802188395507.issue13645@psf.upfronthosting.co.za> |
2012-01-09 22:18:09 | brett.cannon | link | issue13645 messages |
2012-01-09 22:18:08 | brett.cannon | create | |
|