def get_all_dict(module):
 if hasattr(module, '__all__'):
  all_dict = copy.deepcopy(module.__all__)
 else:
  all_dict = copy.deepcopy(dir(module))
  all_dict = [name for name in all_dict if (not name.startswith('_'))]
 for name in ['absolute_import', 'division', 'print_function']:
  try:
   all_dict.remove(name)
  except ValueError:
   pass
 all_dict = [name for name in all_dict if (not inspect.ismodule(getattr(module, name, None)))]
 deprecated = []
 not_deprecated = []
 for name in all_dict:
  f = getattr(module, name, None)
  if (callable(f) and is_deprecated(f)):
   deprecated.append(name)
  else:
   not_deprecated.append(name)
 others = set(dir(module)).difference(set(deprecated)).difference(set(not_deprecated))
 return (not_deprecated, deprecated, others)

def get_all_dict ( module ) : if hasattr ( module , '__all__' ) : all_dict = copy . deepcopy ( module . __all__ ) else : all_dict = copy . deepcopy ( dir ( module ) ) all_dict = [ name for name in all_dict if ( not name . startswith ( '_' ) ) ] for name in [ 'absolute_import' , 'division' , 'print_function' ] : try : all_dict . remove ( name ) except ValueError : pass all_dict = [ name for name in all_dict if ( not inspect . ismodule ( getattr ( module , name , None ) ) ) ] deprecated = [ ] not_deprecated = [ ] for name in all_dict : f = getattr ( module , name , None ) if ( callable ( f ) and is_deprecated ( f ) ) : deprecated . append ( name ) else : not_deprecated . append ( name ) others = set ( dir ( module ) ) . difference ( set ( deprecated ) ) . difference ( set ( not_deprecated ) ) return ( not_deprecated , deprecated , others )
return a copy of the __all__ dict with irrelevant items removed .