def by_type(typename, objects=None):
 if (objects is None):
  objects = gc.get_objects()
 try:
  if ('.' in typename):
   return [o for o in objects if (_long_typename(o) == typename)]
  else:
   return [o for o in objects if (_short_typename(o) == typename)]
 finally:
  del objects

def by_type ( typename , objects = None ) : if ( objects is None ) : objects = gc . get_objects ( ) try : if ( '.' in typename ) : return [ o for o in objects if ( _long_typename ( o ) == typename ) ] else : return [ o for o in objects if ( _short_typename ( o ) == typename ) ] finally : del objects
return objects tracked by the garbage collector with a given class name .