On 7/20/06, Phillip J. Eby <pje at telecommunity.com> wrote: > > While investigating the need to apply http://python.org/sf/1525766 I found > that there was a modification to pkgutil during the need-for-speed sprint > that affects the PEP 302 protocol in a backwards incompatible way. > > Specifically, PEP 302 documents that path_importer_cache always contains > either importer objects or None. Any code written to obtain importer > objects is therefore now broken, because import.c is slapping False in for > non-existent filesystem paths. > > The pkgutil module was then hacked to work around this problem, thereby > hiding the breakage from at least the standard library, but not any > external libraries that follow the PEP 302 protocol to find importers. > > There are several options as to how to proceed: > > 1. Revert the change > 2. Document the breakage, update PEP 302, and make everybody update their > code > 3. Make it not break existing code, by using a NonexistentPathImporter or > NullImporter type in place of "False" in sys.path_importer_cache. > > Any thoughts? Revert it. Is it really that much of a bonus to use False over None? Both evaluate to false and both are already singleton so you can use 'is' for testing. -Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060720/3e21b965/attachment.htm
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