*************************************************************************** IPython post-mortem report {'commit_hash': '177894e', 'commit_source': 'installation', 'default_encoding': 'UTF-8', 'ipython_path': '/home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/IPython', 'ipython_version': '0.13.1', 'os_name': 'posix', 'platform': 'Linux-3.1.10-1.19-desktop-x86_64-with-SuSE-12.1-x86_64', 'sys_executable': '/home/simon/SAGE/prerelease/sage-5.9.rc0/local/bin/python', 'sys_platform': 'linux2', 'sys_version': '2.7.3 (default, Apr 26 2013, 12:56:54) \n[GCC 4.6.2]'} *************************************************************************** *************************************************************************** Crash traceback: --------------------------------------------------------------------------- AttributeErrorPython 2.7.3: /home/simon/SAGE/prerelease/sage-5.9.rc0/local/bin/python Fri May 24 22:59:11 2013 A problem occured executing Python code. Here is the sequence of function calls leading up to the error, with the most recent (innermost) call last. /home/simon/SAGE/prerelease/sage-5.9.rc0/local/bin/sage-ipython in () 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 """ 4 Sage IPython startup script. 5 """ 6 from sage.misc.interpreter import SageTerminalApp 7 8 # Make sure we're using the Sage profile if one isn't specified. 9 import sys 10 if '--profile' not in sys.argv: 11 sys.argv.extend(['--profile', 'sage']) 12 13 app = SageTerminalApp.instance() ---> 14 app.initialize() global app.initialize = > 15 app.start() /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.pyc in initialize(self=, argv=None) /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/IPython/config/application.pyc in catch_config_error(method=, app=, *args=(None,), **kwargs={}) 69 70 #----------------------------------------------------------------------------- 71 # Application class 72 #----------------------------------------------------------------------------- 73 74 @decorator 75 def catch_config_error(method, app, *args, **kwargs): 76 """Method decorator for catching invalid config (Trait/ArgumentErrors) during init. 77 78 On a TraitError (generally caused by bad config), this will print the trait's 79 message, and exit the app. 80 81 For use on init methods, to prevent invoking excepthook on invalid input. 82 """ 83 try: ---> 84 return method(app, *args, **kwargs) method = app = args = (None,) kwargs = {} 85 except (TraitError, ArgumentError) as e: 86 app.print_description() 87 app.print_help() 88 app.print_examples() 89 app.log.fatal("Bad config encountered during initialization:") 90 app.log.fatal(str(e)) 91 app.log.debug("Config at the time: %s", app.config) 92 app.exit(1) 93 94 95 class ApplicationError(Exception): 96 pass 97 98 99 class Application(SingletonConfigurable): /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/IPython/frontend/terminal/ipapp.pyc in initialize(self=, argv=None) 309 310 @catch_config_error 311 def initialize(self, argv=None): 312 """Do actions after construct, but before starting the app.""" 313 super(TerminalIPythonApp, self).initialize(argv) 314 if self.subapp is not None: 315 # don't bother initializing further, starting subapp 316 return 317 if not self.ignore_old_config: 318 check_for_old_config(self.ipython_dir) 319 # print self.extra_args 320 if self.extra_args and not self.something_to_run: 321 self.file_to_run = self.extra_args[0] 322 self.init_path() 323 # create the shell --> 324 self.init_shell() self.init_shell = > 325 # and draw the banner 326 self.init_banner() 327 # Now a variety of things that happen after the banner is printed. 328 self.init_gui_pylab() 329 self.init_extensions() 330 self.init_code() 331 332 def init_shell(self): 333 """initialize the InteractiveShell instance""" 334 # Create an InteractiveShell instance. 335 # shell.display_banner should always be False for the terminal 336 # based app, because we call shell.show_banner() by hand below 337 # so the banner shows *before* all extension loading stuff. 338 self.shell = TerminalInteractiveShell.instance(config=self.config, 339 display_banner=False, profile_dir=self.profile_dir, /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/interpreter.pyc in init_shell(self=) 721 sage: from sage.misc.interpreter import SageTerminalApp, DEFAULT_SAGE_CONFIG 722 sage: app = SageTerminalApp(config=DEFAULT_SAGE_CONFIG) 723 sage: app.initialize(argv=[]) # indirect doctest 724 sage: app.shell 725 726 """ 727 # We need verbose crashes for the Sage crash handler. We set it here 728 # so that we don't overwrite the traitlet attribute 729 self.verbose_crash = True 730 731 # Shell initialization 732 self.shell = SageInteractiveShell.instance(config=self.config, 733 display_banner=False, profile_dir=self.profile_dir, 734 ipython_dir=self.ipython_dir) 735 self.shell.configurables.append(self) --> 736 self.shell.extension_manager.load_extension('sage.misc.sage_extension') self.shell.extension_manager.load_extension = > /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/IPython/core/extensions.pyc in load_extension(self=, module_str='sage.misc.sage_extension') 75 76 def _on_ipython_dir_changed(self): 77 if not os.path.isdir(self.ipython_extension_dir): 78 os.makedirs(self.ipython_extension_dir, mode = 0777) 79 80 def load_extension(self, module_str): 81 """Load an IPython extension by its module name. 82 83 If :func:`load_ipython_extension` returns anything, this function 84 will return that object. 85 """ 86 from IPython.utils.syspathcontext import prepended_to_syspath 87 88 if module_str not in sys.modules: 89 with prepended_to_syspath(self.ipython_extension_dir): ---> 90 __import__(module_str) global __import__ = undefined module_str = 'sage.misc.sage_extension' 91 mod = sys.modules[module_str] 92 return self._call_load_ipython_extension(mod) 93 94 def unload_extension(self, module_str): 95 """Unload an IPython extension by its module name. 96 97 This function looks up the extension's name in ``sys.modules`` and 98 simply calls ``mod.unload_ipython_extension(self)``. 99 """ 100 if module_str in sys.modules: 101 mod = sys.modules[module_str] 102 self._call_unload_ipython_extension(mod) 103 104 def reload_extension(self, module_str): 105 """Reload an IPython extension by calling reload. /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/sage_extension.py in () 35 2 36 37 In contrast, input to the ``%time`` magic command is preparsed:: 38 39 sage: shell.run_cell('%time 594.factor()') 40 CPU times: user ... 41 Wall time: ... 42 2 * 3^3 * 11 43 """ 44 45 from IPython.core.hooks import TryNext 46 from IPython.core.magic import Magics, magics_class, line_magic 47 import os 48 import sys 49 import sage ---> 50 import sage.all global sage.all = undefined 51 from sage.misc.interpreter import preparser 52 from sage.misc.preparser import preparse 53 54 @magics_class 55 class SageMagics(Magics): 56 57 @line_magic 58 def runfile(self, s): 59 r""" 60 Loads the code contained in the file ``s``. This is designed 61 to be used from the command line as ``%runfile /path/to/file``. 62 63 :param s: file to be loaded 64 :type s: string 65 /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/all.py in () 67 ################################################################### 68 69 # We have to set this here so urllib, etc. can detect it. 70 import sage.server.notebook.gnutls_socket_ssl 71 sage.server.notebook.gnutls_socket_ssl.require_SSL() 72 73 ################################################################### 74 75 import sage.ext.c_lib 76 sage.ext.c_lib._init_csage() 77 sig_on_count = sage.ext.c_lib._sig_on_reset 78 79 from time import sleep 80 81 import sage.misc.lazy_import ---> 82 from sage.misc.all import * # takes a while global sage.misc.all = undefined 83 84 from sage.misc.sh import sh 85 86 from sage.libs.all import * 87 from sage.doctest.all import * 88 89 from sage.rings.all import * 90 from sage.matrix.all import * 91 92 # This must come before Calculus -- it initializes the Pynac library. 93 import sage.symbolic.pynac 94 95 from sage.modules.all import * 96 from sage.monoids.all import * 97 from sage.algebras.all import * /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/all.py in () 70 from sage_eval import sage_eval, sageobj 71 72 from sage_input import sage_input 73 74 from cython import cython_lambda, cython_create_local_so 75 from cython_c import cython 76 pyrex = cython # synonym -- for now 77 sagex = cython # synonym -- for now 78 79 from prun import prun 80 81 from persist import save, load, dumps, loads, db, db_save 82 83 from func_persist import func_persist 84 ---> 85 from functional import (additive_order, global functional = undefined global additive_order = undefined global sqrt = undefined global numerical_sqrt = undefined global base_ring = undefined global base_field = undefined global basis = undefined global category = undefined global charpoly = undefined global characteristic_polynomial = undefined global coerce = undefined global cyclotomic_polynomial = undefined global decomposition = undefined global denominator = undefined global det = undefined global dimension = undefined global dim = undefined global discriminant = undefined global disc = undefined global eta = undefined global exp = undefined global factor = undefined global fcp = undefined global gen = undefined global gens = undefined global hecke_operator = undefined global ideal = undefined global image = undefined global integral = undefined global integrate = undefined global integral_closure = undefined global interval = undefined global xinterval = undefined global is_commutative = undefined global is_even = undefined global is_integrally_closed = undefined global is_field = undefined global is_odd = undefined global kernel = undefined global krull_dimension = undefined global lift = undefined global minimal_polynomial = undefined global minpoly = undefined global multiplicative_order = undefined global ngens = undefined global norm = undefined global numerator = undefined global numerical_approx = undefined global n = undefined global N = undefined global objgens = undefined global objgen = undefined global one = undefined global order = undefined global rank = undefined global regulator = undefined global round = undefined global quotient = undefined global quo = undefined global show = undefined global isqrt = undefined global squarefree_part = undefined global symbolic_sum = undefined global sum = undefined global transpose = undefined global zero = undefined global log = undefined global log_b = undefined global parent = undefined 86 sqrt as numerical_sqrt, 87 base_ring, 88 base_field, 89 basis, 90 category, 91 charpoly, 92 characteristic_polynomial, 93 coerce, 94 cyclotomic_polynomial, 95 decomposition, 96 denominator, 97 det, 98 dimension, 99 dim, 100 discriminant, /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/functional.py in () 17 # 18 # Distributed under the terms of the GNU General Public License (GPL) 19 # 20 # This code is distributed in the hope that it will be useful, 21 # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 # General Public License for more details. 24 # 25 # The full text of the GPL is available at: 26 # 27 # http://www.gnu.org/licenses/ 28 #***************************************************************************** 29 30 31 import sage.misc.latex ---> 32 import sage.interfaces.expect global sage.interfaces.expect = undefined 33 import sage.interfaces.mathematica 34 35 36 from sage.rings.complex_double import CDF 37 from sage.rings.real_double import RDF, RealDoubleElement 38 39 import sage.rings.real_mpfr 40 import sage.rings.complex_field 41 import sage.rings.integer 42 43 import __builtin__ 44 45 LOG_TEN_TWO_PLUS_EPSILON = 3.321928094887363 # a small overestimate of log(10,2) 46 47 ############################################################################## /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/interfaces/expect.py in () 46 import weakref 47 import time 48 import gc 49 import operator 50 import quit 51 import cleaner 52 from random import randrange 53 54 ######################################################## 55 # Important note: We use Pexpect 2.0 *not* Pexpect 2.1. 56 # For reasons I don't understand, pexpect2.1 is much 57 # worse than pexpect 2.0 for everything Sage does. 58 ######################################################## 59 import pexpect 60 from pexpect import ExceptionPexpect ---> 61 from sage.interfaces.interface import Interface, InterfaceElement, InterfaceFunction, InterfaceFunctionElement, AsciiArtString global sage.interfaces.interface = undefined global Interface = undefined global InterfaceElement = undefined global InterfaceFunction = undefined global InterfaceFunctionElement = undefined global AsciiArtString = undefined 62 63 from sage.structure.sage_object import SageObject 64 from sage.structure.parent_base import ParentWithBase 65 from sage.structure.element import RingElement 66 67 import sage.misc.sage_eval 68 from sage.misc.misc import SAGE_EXTCODE, verbose, SAGE_TMP_INTERFACE, LOCAL_IDENTIFIER 69 from sage.misc.object_multiplexer import Multiplex 70 71 BAD_SESSION = -2 72 73 failed_to_start = [] 74 75 # The subprocess is a shared resource. In a multi-threaded 76 # environment, there would have to be a lock to control access to the /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/interfaces/interface.py in () 27 # Distributed under the terms of the GNU General Public License (GPL) 28 # 29 # This code is distributed in the hope that it will be useful, 30 # but WITHOUT ANY WARRANTY; without even the implied warranty of 31 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 32 # General Public License for more details. 33 # 34 # The full text of the GPL is available at: 35 # 36 # http://www.gnu.org/licenses/ 37 #***************************************************************************** 38 39 import operator 40 41 from sage.structure.sage_object import SageObject ---> 42 from sage.structure.parent_base import ParentWithBase global sage.structure.parent_base = undefined global ParentWithBase = undefined 43 from sage.structure.element import RingElement 44 45 import sage.misc.sage_eval 46 47 48 class AsciiArtString(str): 49 def __repr__(self): 50 return str(self) 51 52 53 class Interface(ParentWithBase): 54 """ 55 Interface interface object. 56 """ 57 def __init__(self, name): /home/simon/SAGE/prerelease/sage-5.9.rc0/parent_base.pyx in init sage.structure.parent_base (sage/structure/parent_base.c:2154)() /home/simon/SAGE/prerelease/sage-5.9.rc0/parent_old.pyx in init sage.structure.parent_old (sage/structure/parent_old.c:7926)() /home/simon/SAGE/prerelease/sage-5.9.rc0/parent.pyx in init sage.structure.parent (sage/structure/parent.c:24488)() /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.so in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (sage/misc/classcall_metaclass.c:1105)() /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/category_singleton.so in sage.categories.category_singleton.Category_singleton.__classcall__ (sage/categories/category_singleton.c:1642)() /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/category.pyc in __classcall__(cls=, *args=(), **options={}) 447 448 .. SEEALSO:: :meth:`subcategory_class` 449 450 EXAMPLES:: 451 452 sage: A = Algebras(QQ) 453 sage: A.__class__ 454 455 sage: A is Algebras(QQ) 456 True 457 sage: A is A.__class__(QQ) 458 True 459 """ 460 if isinstance(cls, DynamicMetaclass): 461 cls = cls.__base__ --> 462 return super(Category, cls).__classcall__(cls, *args, **options) global super = undefined global Category = cls.__classcall__ = cls = args = () options = {} 463 464 def __init__(self, s=None): 465 """ 466 Initializes this category. 467 468 INPUT: 469 470 - ``s`` -- (Default: ``None``) A string giving the name of this 471 category. If ``None``, the name is determined from the name of 472 the class. 473 474 EXAMPLES:: 475 476 sage: class SemiprimitiveRings(Category): 477 ... def super_categories(self): /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/cachefunc.so in sage.misc.cachefunc.WeakCachedFunction.__call__ (sage/misc/cachefunc.c:5363)() /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/structure/unique_representation.pyc in __classcall__(cls=, *args=(), **options={}) 432 def __classcall__(cls, *args, **options): 433 """ 434 Constructs a new object of this class or reuse an existing one. 435 436 See also :class:`CachedRepresentation` and 437 :class:`UniqueRepresentation` for a discussion. 438 439 EXAMPLES:: 440 441 sage: x = UniqueRepresentation() 442 sage: y = UniqueRepresentation() 443 sage: x is y # indirect doctest 444 True 445 446 """ --> 447 instance = typecall(cls, *args, **options) instance = undefined global typecall = cls = args = () options = {} 448 assert isinstance( instance, cls ) 449 if instance.__class__.__reduce__ == CachedRepresentation.__reduce__: 450 instance._reduction = (cls, args, options) 451 return instance 452 453 @classmethod 454 def _clear_cache_(cls): 455 """ 456 Remove all instances of this class from the cache. 457 458 EXAMPLES: 459 460 If ``cls`` overloads :meth:`~sage.structure.unique_representation.CachedRepresentation.__classcall__`, 461 clearing the cache still works, because ``cls.mro()`` 462 is searched until a ``__classcall__`` with an attribute /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.so in sage.misc.classcall_metaclass.typecall (sage/misc/classcall_metaclass.c:1467)() /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/category.pyc in __init__(self=Category of category_singleton, s=None) 482 ... return self.ideal(0) 483 ... 484 sage: C = SemiprimitiveRings("SPR") 485 sage: C 486 Category of SPR 487 sage: C.__class__ 488 489 """ 490 if s is not None: 491 if isinstance(s, str): 492 self._label = s 493 self.__repr_object_names = s 494 else: 495 raise TypeError, "Argument string must be a string." 496 self.__class__ = dynamic_class("%s_with_category"%self.__class__.__name__, --> 497 (self.__class__, self.subcategory_class, ), self.__class__ = self.subcategory_class = undefined 498 cache = False, reduction = None, 499 doccls=self.__class__) 500 501 @lazy_attribute 502 def _label(self): 503 """ 504 A short name of self, obtained from its type. 505 506 EXAMPLES:: 507 508 sage: Rings()._label 509 'Rings' 510 511 """ 512 t = str(self.__class__.__base__) /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_attribute.pyc in __get__(self=, a=Category of category_singleton, cls=) 520 return self 521 try: 522 # __cached_methods is supposed to be a public Cython attribute. 523 # Apparently, these are *not* subject to name mangling. 524 CM = getattr(a, '__cached_methods') 525 if CM is None: 526 CM = {} 527 setattr(a, '__cached_methods', CM) 528 except AttributeError,msg: 529 CM = None 530 if CM is not None: 531 try: 532 return CM[self.f.__name__] 533 except KeyError: 534 pass --> 535 result = self.f(a) result = undefined self.f = a = Category of category_singleton 536 if result is NotImplemented: 537 # Workaround: we make sure that cls is the class 538 # where the lazy attribute self is actually defined. 539 # This avoids running into an infinite loop 540 # See About descriptor specifications 541 for supercls in cls.__mro__: 542 if self.f.__name__ in supercls.__dict__ and self is supercls.__dict__[self.f.__name__]: 543 cls = supercls 544 return getattr(super(cls, a),self.f.__name__) 545 try: 546 setattr(a, self.f.__name__, result) 547 except AttributeError: 548 if CM is not None: 549 CM[self.f.__name__] = result 550 return result /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/category.pyc in subcategory_class(self=Category of category_singleton) 1215 1216 sage: isinstance(Rings(), cls) 1217 True 1218 sage: isinstance(AlgebrasWithBasis(QQ), cls) 1219 True 1220 1221 TESTS:: 1222 1223 sage: cls = Algebras(QQ).subcategory_class; cls 1224 1225 sage: type(cls) 1226 1227 1228 """ 1229 return self._make_named_class('subcategory_class', 'SubcategoryMethods', -> 1230 cache=False, picklable=False) global cache = undefined global False = undefined global picklable = undefined 1231 1232 @lazy_attribute 1233 def parent_class(self): 1234 """ 1235 A common super class for all parents in this category. 1236 1237 EXAMPLES:: 1238 1239 sage: C = Algebras(QQ).parent_class; C 1240 1241 sage: type(C) 1242 1243 1244 By :trac:`11935`, some categories share their parent 1245 classes. For example, the parent class of an algebra only /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/category.pyc in _make_named_class(self=Category of category_singleton, name='subcategory_class', method_provider='SubcategoryMethods', cache=False, picklable=False) 1171 else: 1172 # Otherwise, check XXXMethods 1173 assert inspect.isclass(method_provider_cls),\ 1174 "%s.%s should be a class"%(cls.__name__, method_provider) 1175 mro = inspect.getmro(method_provider_cls) 1176 if len(mro) > 2 or (len(mro) == 2 and mro[1] is not object): 1177 from warnings import warn 1178 warn("%s.%s should not have a super class"%(cls.__name__, method_provider)) 1179 # and point the documentation to it 1180 doccls = method_provider_cls 1181 if picklable: 1182 reduction = (getattr, (self, name)) 1183 else: 1184 reduction = None 1185 return dynamic_class(class_name, -> 1186 tuple(getattr(cat,name) for cat in self._super_categories), global tuple = undefined global getattr = undefined global cat = undefined name = 'subcategory_class' self._super_categories = undefined 1187 method_provider_cls, prepend_cls_bases = False, doccls = doccls, 1188 reduction = reduction, cache = cache) 1189 1190 1191 @lazy_attribute 1192 def subcategory_class(self): 1193 """ 1194 A common superclass for all subcategories of this category (including this one). 1195 1196 This class derives from ``D.subcategory_class`` for each super 1197 category `D` of ``self``, and includes all the methods from 1198 the nested class ``self.SubcategoryMethods``, if it exists. 1199 1200 .. SEEALSO:: 1201 /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/lazy_attribute.pyc in __get__(self=, a=Category of category_singleton, cls=) 520 return self 521 try: 522 # __cached_methods is supposed to be a public Cython attribute. 523 # Apparently, these are *not* subject to name mangling. 524 CM = getattr(a, '__cached_methods') 525 if CM is None: 526 CM = {} 527 setattr(a, '__cached_methods', CM) 528 except AttributeError,msg: 529 CM = None 530 if CM is not None: 531 try: 532 return CM[self.f.__name__] 533 except KeyError: 534 pass --> 535 result = self.f(a) result = undefined self.f = a = Category of category_singleton 536 if result is NotImplemented: 537 # Workaround: we make sure that cls is the class 538 # where the lazy attribute self is actually defined. 539 # This avoids running into an infinite loop 540 # See About descriptor specifications 541 for supercls in cls.__mro__: 542 if self.f.__name__ in supercls.__dict__ and self is supercls.__dict__[self.f.__name__]: 543 cls = supercls 544 return getattr(super(cls, a),self.f.__name__) 545 try: 546 setattr(a, self.f.__name__, result) 547 except AttributeError: 548 if CM is not None: 549 CM[self.f.__name__] = result 550 return result /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/category.pyc in _super_categories(self=Category of category_singleton) 1009 The immediate super categories of this category. 1010 1011 This lazy attributes caches the result of the mandatory method 1012 :meth:`super_categories` for speed. 1013 1014 Whenever speed matters, developers are advised to use this 1015 lazy attribute rather than calling :meth:`super_categories`. 1016 1017 .. note:: this attribute is likely to eventually become a tuple. 1018 1019 EXAMPLES:: 1020 1021 sage: Rings()._super_categories 1022 [Category of rngs, Category of semirings] 1023 """ -> 1024 return self.super_categories() self.super_categories = 1025 1026 def _test_category_graph(self, **options): 1027 """ 1028 Check that the category graph matches with Python's method resolution order 1029 1030 .. note:: 1031 1032 By :trac:`11943`, the list of categories returned by 1033 :meth:`all_super_categories` is supposed to match with the 1034 method resolution order of the parent and element 1035 classes. This method checks this. 1036 1037 .. todo:: currently, this won't work for hom categories. 1038 1039 EXAMPLES:: /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/sets_cat.pyc in super_categories(self=Category of category_singleton) 188 189 """ 190 191 def super_categories(self): 192 r""" 193 We include SetsWithPartialMaps between Sets and Objects so that we 194 can define morphisms between sets that are only partially defined. 195 This is also to have the Homset constructor not complain that 196 SetsWithPartialMaps is not a supercategory of Fields, for example. 197 198 EXAMPLES:: 199 200 sage: Sets().super_categories() 201 [Category of sets with partial maps] 202 """ --> 203 return [SetsWithPartialMaps()] global SetsWithPartialMaps = 204 205 def _call_(self, X, enumerated_set_if_possible = False): 206 r""" 207 Construct an object in this category from the data in ``X``. 208 209 EXAMPLES:: 210 211 sage: Sets()(ZZ) 212 Integer Ring 213 sage: Sets()([1, 2, 3]) 214 {1, 2, 3} 215 216 .. note:: 217 218 Using ``Sets()(A)`` used to implement some sort of /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/misc/classcall_metaclass.so in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (sage/misc/classcall_metaclass.c:1105)() /home/simon/SAGE/prerelease/sage-5.9.rc0/local/lib/python2.7/site-packages/sage/categories/category_singleton.so in sage.categories.category_singleton.Category_singleton.__classcall__ (sage/categories/category_singleton.c:1656)() AttributeError: type object 'SetsWithPartialMaps' has no attribute '_set_classcall' *************************************************************************** History of session input: *** Last line of input (may not be in above history):