#10963: More functorial constructions
-------------------------------------+-------------------------------------
       Reporter:  nthiery            |        Owner:  stumpc5
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.1
      Component:  categories         |   Resolution:
       Keywords:  days54             |    Merged in:
        Authors:  Nicolas M. Thiéry  |    Reviewers:  Simon King, Frédéric
Report Upstream:  N/A                |  Chapoton
         Branch:                     |  Work issues:
  public/ticket/10963                |       Commit:
   Dependencies:  #11224, #8327,     |  bdefe0daeb7a4154a506f5ac69a064b6150f8de6
  #10193, #12895, #14516, #14722,    |     Stopgaps:
  #13589, #14471, #15069, #15094,    |
  #11688, #13394, #15150, #15506     |
-------------------------------------+-------------------------------------
Changes (by SimonKing):

 * commit:  8eaf51a82c4e2194769db13457979ae601ebbc04 =>
     bdefe0daeb7a4154a506f5ac69a064b6150f8de6
 * work_issues:  Detect and fix Heisenbugs =>


Comment:

 Here is the new commit. What it does:

 - Do not access the lazy attribute (since this may happen while it is
 being computed) when what we want to know is in fact whether the attribute
 is in the `__dict__` of the class.
 - Remove the cache from `base_category_class_and_axiom`, since it is
 cached by the lazy attribute anyway.
 - Correctly state that `cls._base_category_class_and_axiom_was_guessed =
 False` if the attribute is in fact not guessed but explicitly set by
 invoking the classget.

 Consequences:
 - Most of the time, the lazy attribute is not guessed but explicitly set.
 I think this should save a lot of computation time. In fact, during
 startup, a "guess" only happens precisely five times!
 - Since there are some tests expecting
 `cls._base_category_class_and_axiom_was_guessed == True`, I suppose I have
 to change some doctests.

 Doing `make ptest` now. But I guess you can already have a look at the
 code, to see if it is clearer now.

--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:269>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to