Changes between Version 3 and Version 6 of Ticket #14767


Ignore:
Timestamp:
Jun 24, 2013, 8:39:22 PM (9 years ago)
Author:
Nicolas M. Thiéry
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #14767

    • Property Status changed from needs_review to needs_info
    • Property Authors changed from to Vincent Delecroix
    • Property Reviewers changed from to Nicolas M. Thiéry
    • Property Work issues changed from to Do we want the bonus feature
  • Ticket #14767 – Description

    v3 v6  
    1010That's because `NN` is a not-yet-resolved lazy imported object.
    1111
    12 solution 1: the default value for ``lazy`` could possibly be set to True for lazy imported objects (original proposition of the ticket)
    13 
    14 solution 2: if the object is a `LazyImport` then get the corresponding object with `._get_object`
    15 (solution implemented in the ticket)
    16 
    17 With the patch applied
     12Solution: if the object is a `LazyImport` then get the corresponding
     13object with `._get_object`. With the patch applied:
    1814{{{
    1915sage: import_statements(NN)
     
    2218from sage.rings.semirings.non_negative_integer_semiring import NN
    2319}}}
     20
     21Potential bonus feature: set lazy=True by default for lazy imported object:
     22{{{
     23sage: import_statements(NN)
     24lazy_import('from sage.rings.semirings.non_negative_integer_semiring', 'NN')
     25}}}