[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.
Phillip J. Eby
pje at telecommunity.com
Fri May 11 04:05:22 CEST 2007
At 09:35 PM 5/10/2007 -0400, Jim Jewett wrote:
>On 5/10/07, Phillip J. Eby <pje at telecommunity.com> wrote:
>>Using the "Importing" package from the Cheeseshop:
>>from peak.util.imports import whenImported
>>I certainly wouldn't object to making 'whenImported' and its friends
>>a part of the stdlib.
>Adding whenImported would be useful, even outside of ABCs and generic
>But please don't go overboard with the "and its friends" part. That
>15K zip file boiled down to a 370 line python module. Over 200 of
>those lines were to support things like module inheritance
Actually, the part that deals with module inheritance is 16 lines,
unless you count the documentation for it, which is another 22
lines. But I have no problem leaving that out of the stdlib; module
inheritance is deprecated even in PEAK.
>returning a sequence with strings replaced by the result of running
>import/getattr on them. Those uses are probably too obscure for the
If you mean importObject, importSequence, and importSuite, I agree with you.
Really, by "and friends" I mean importString and lazyModule, and I'm
fine with relocating and renaming them, as well as stripping out the
relative path bit.
More information about the Python-3000