Brett Cannon <br...@python.org> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue13645>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to