Changes between Version 15 and Version 16 of Ticket #15425


Ignore:
Timestamp:
09/06/15 13:28:31 (5 years ago)
Author:
chapoton
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15425 – Description

    v15 v16  
    3939    #12959 in {{{Sets.ParentMethods.CartesianProduct}}}:
    4040    {{{
    41                 return parents[0].__class__ -> return parents[0].__class__
     41        return parents[0].__class__ -> return parents[0].__class__
    4242    }}}
    4343
     
    76766.  Fix cartesian products involving {{{NN}}}:
    7777    {{{
    78         sage: cartesian_product([NN,NN])
    79         170         from sage.structure.parent import Parent
     78    sage: cartesian_product([NN,NN])
     79    170         from sage.structure.parent import Parent
    8080    --> 171         assert(all(isinstance(parent, Parent) for parent in parents))
    81         172         # Should we pass a set of categories to reduce the cache size?
    82         173         # But then this would impose that, for any constructor, the
    83         AssertionError:
     81    172         # Should we pass a set of categories to reduce the cache size?
     82    173         # But then this would impose that, for any constructor, the
     83    AssertionError:
    8484    }}}
    8585    This is in fact a bug in the way {{{NN}}} is lazy imported in the global
     
    8787    {{{
    8888        sage: type(NN)
    89         <type 'sage.misc.lazy_import.LazyImport'>
    90         sage: isinstance(NN, Parent)
     89    <type 'sage.misc.lazy_import.LazyImport'>
     90    sage: isinstance(NN, Parent)
    9191        False
    9292    }}}
    9393    Things works if one forces the import of {{{NN}}}:
    9494    {{{
    95         sage: NN = NonNegativeIntegers()
    96         sage: cartesian_product([NN,NN])
    97         The cartesian product of (Non negative integers, Non negative integers)
     95    sage: NN = NonNegativeIntegers()
     96    sage: cartesian_product([NN,NN])
     97    The cartesian product of (Non negative integers, Non negative integers)
    9898    }}}
    9999