[Python-ideas] dir with a glob?
Steven D'Aprano
steve at pearwood.info
Fri Jul 1 06:43:37 CEST 2011
Nick Coghlan wrote:
> However, this now needs a tracker issue and a patch - as a builtin
> that may legitimately be used before the import machinery is fully
> initialised, it isn't really acceptable for dir() to depend on the
> fnmatch module just for this feature, so implementing this isn't going
> to be quite as easy as it might otherwise be.
When does site.py run? If it is guaranteed to run after the import
machinery is working, then perhaps the simplest solution is to patch
built-ins in site.py, similar to how help() and quit() are added.
--
Steven
More information about the Python-ideas
mailing list