You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This function is problematic when sage.all is not available (in modularized subset distributions):
def lookup_global(name):
"""
Used in unpickling the factory itself.
EXAMPLES::
sage: from sage.structure.factory import lookup_global
sage: lookup_global('ZZ')
Integer Ring
sage: lookup_global('sage.rings.all.ZZ')
Integer Ring
"""
name = bytes_to_str(name, encoding='ASCII')
try:
return factory_unpickles[name]
except KeyError:
pass
if '.' in name:
module, name = name.rsplit('.', 1)
all = __import__(module, fromlist=[name])
else:
import sage.all as all
return getattr(all, name)