Changes between Initial Version and Version 1 of Ticket #22164, comment 52


Ignore:
Timestamp:
02/13/17 15:35:44 (3 years ago)
Author:
jdemeyer
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22164, comment 52

    initial v1  
    1 I'm still building the code, but you should add a doctest to show that
     1Please add a doctest
    22{{{
    3 ECModularSymbol.__new__(ECModularSymbol)
     3sage: ECModularSymbol.__new__(ECModularSymbol)
     4Modular symbol with sign 0 over Rational Field attached to None
    45}}}
    5 works (in the sense that it doesn't crash Sage).
     6to show that this doesn't crash Sage.
     7
     8The reason I ask this is that a non-trivial `__dealloc__` has potential to crash Sage if it makes assumptions which are not satisfied after `__new__`.
     9
     10Here, there is no problem because Cython initializes `self.nfs = NULL` in `__new__` and deleting a `NULL` pointer is safe.