Ticket #12677: trac_12677-sageinspect_dont_use_Poset-nt.patch

File trac_12677-sageinspect_dont_use_Poset-nt.patch, 1.5 KB (added by nthiery, 10 years ago)
  • sage/misc/sageinspect.py

    # HG changeset patch
    # User Nicolas M. Thiery <nthiery@users.sf.net>
    # Date 1331914899 -3600
    # Node ID 5c123c59de8c2788fbfb29ac46c95e10182272fb
    # Parent  e3c19550b5b9fa3d830fbea6bab34db685a5827c
    #12677: Make the doctests of sage.misc.sageinspect.sage_getargspec independent of ``Poset``
    
    diff --git a/sage/misc/sageinspect.py b/sage/misc/sageinspect.py
    a b def sage_getargspec(obj): 
    947947    EXAMPLES::
    948948
    949949        sage: from sage.misc.sageinspect import sage_getargspec
     950        sage: def f(x, y, z=1, t=2, *args, **keywords):
     951        ...       pass
     952        sage: sage_getargspec(f)
     953        ArgSpec(args=['x', 'y', 'z', 't'], varargs='args', keywords='keywords', defaults=(1, 2))
     954
     955    We now run sage_getargspec on some functions from the Sage library::
     956
    950957        sage: sage_getargspec(identity_matrix)
    951958        ArgSpec(args=['ring', 'n', 'sparse'], varargs=None, keywords=None, defaults=(0, False))
    952         sage: sage_getargspec(Poset)
    953         ArgSpec(args=['data', 'element_labels', 'cover_relations', 'category', 'facade', 'key'], varargs=None, keywords=None, defaults=(None, None, False, None, None, None))
    954959        sage: sage_getargspec(factor)
    955960        ArgSpec(args=['n', 'proof', 'int_', 'algorithm', 'verbose'], varargs=None, keywords='kwds', defaults=(None, False, 'pari', 0))
    956961
     962
    957963    In the case of a class or a class instance, the ``ArgSpec`` of the ``__new__`` or ``__init__``
    958964    methods are returned::
    959965