#18529: Topological manifolds: basics
-------------------------------------+-------------------------------------
       Reporter:  egourgoulhon       |        Owner:  egourgoulhon
           Type:  enhancement        |       Status:  needs_info
       Priority:  major              |    Milestone:  sage-6.10
      Component:  geometry           |   Resolution:
       Keywords:  topological        |    Merged in:
  manifolds                          |    Reviewers:  Travis Scrimshaw
        Authors:  Eric Gourgoulhon,  |  Work issues:
  Travis Scrimshaw                   |       Commit:
Report Upstream:  N/A                |  0fb39df7fafe7f0a765bf73b3f34a6cb41e65c40
         Branch:                     |     Stopgaps:
  u/tscrim/top_manifolds_refactor    |
   Dependencies:  #18175             |
-------------------------------------+-------------------------------------

Comment (by tscrim):

 Replying to [comment:76 egourgoulhon]:
 > Another solution would be to revert to `UniqueRepresentation` for
 manifolds (once again!). Since now the user creates manifolds via the
 front-end function `Manifold` and not by a direct call to the manifold
 class constructor, the main issue raised at the end of comment:31 could be
 overcome by the handling of the cache in `Manifold`. In this way
 > {{{
 > sage: M1 = Manifold(2, 'M')
 > sage: M2 = Manifold(2, 'M')
 > }}}
 > would result in two different objects, as desired, but
 > {{{
 > sage: M1 == loads(dumps(M1))
 > }}}
 > would still work, because the unpickling does not go through the
 function `Manifold`.

 This breaks pickling:
 {{{
 sage: class Foo(UniqueRepresentation):
 ....:     def __init__(self, i):
 ....:         pass
 ....:
 sage: F1 = Foo(1)
 sage: Foo._clear_cache_()
 sage: F2 = Foo(1)
 sage: F1 is F2
 False
 sage: F1 == loads(dumps(F1))
 False
 sage: F2 == loads(dumps(F1))
 True
 }}}
 The reason is pickling still goes through the `UniqueRepresentation`
 cache. I am still convinced we should not be using `UniqueRepresentation`
 for the manifolds.

--
Ticket URL: <http://trac.sagemath.org/ticket/18529#comment:77>
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/d/optout.

Reply via email to