benjamin at python.org
Wed Mar 21 02:41:36 CET 2012
Eric Snow <ericsnowcurrently at ...> writes:
> On Mar 20, 2012 1:11 PM, "Benjamin Peterson"
<benjamin at python.org> wrote:
> > Brett Cannon <brett <at> ...> writes:
> > >
> > > I was wondering that myself when looking at imp.source_to_cache() at PyCon.
> > What's implementation specific about that?
> File suffixes on the .pyc files there include implementation information. To
get that info in Python you can use the platform module (not an option for
bootstrapping importlib) or guess (essentially what the platform module does).
I think source_to_cache() is a bad example, though, because the operation would
basically identical in every Python implementation. The tag will just change. It
even changes in every CPython version.
More information about the Python-ideas