There is no change to PEP 302. imp.source_from_cache() and

imp.cache_from_source() may return None.
This commit is contained in:
Barry Warsaw 2010-04-15 01:16:47 +00:00
parent fe4b02b00c
commit be8d659956
1 changed files with 3 additions and 10 deletions

View File

@ -438,16 +438,9 @@ package [17]_:
Alternative implementations are free to override these functions to Alternative implementations are free to override these functions to
return reasonable values based on their own support for this PEP. return reasonable values based on their own support for this PEP.
These methods are allowed to return `None` when the implementation (or
PEP 302 loader [18]_ in effect) for whatever reason cannot calculate
PEP 302 loaders the appropriate file name. They should not raise exceptions.
---------------
PEP 302 [18]_ defined loaders have a `.get_filename()` method which
points to the `__file__` for a module. As part of this PEP, we will
extend this API, to include a new method `.get_paths()` which will
return a 2-tuple containing the path to the source file and the path
to where the matching `pyc` file is (or would be).
Backports Backports