mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
replace callable()
This commit is contained in:
parent
0c8bee6393
commit
de0559998f
7 changed files with 18 additions and 18 deletions
|
@ -51,7 +51,7 @@ class ImportManager:
|
|||
self.namespace['__import__'] = self.previous_importer
|
||||
|
||||
def add_suffix(self, suffix, importFunc):
|
||||
assert callable(importFunc)
|
||||
assert hasattr(importFunc, '__call__')
|
||||
self.fs_imp.add_suffix(suffix, importFunc)
|
||||
|
||||
######################################################################
|
||||
|
@ -539,7 +539,7 @@ class _FilesystemImporter(Importer):
|
|||
self.suffixes = [ ]
|
||||
|
||||
def add_suffix(self, suffix, importFunc):
|
||||
assert callable(importFunc)
|
||||
assert hasattr(importFunc, '__call__')
|
||||
self.suffixes.append((suffix, importFunc))
|
||||
|
||||
def import_from_dir(self, dir, fqname):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue