#14304: New implementation of unramified p-adics using FLINT and templates
-------------------------------------+-------------------------------------
       Reporter:  roed               |        Owner:  roed
           Type:  enhancement        |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.4
      Component:  padics             |   Resolution:
       Keywords:  sd59               |    Merged in:
        Authors:  Julian Rueth,      |    Reviewers:  David Roe, Julian
  David Roe                          |  Rueth
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/saraedum/ticket/14304            |  2c3a71063fd13752a1f839a573191139fb1fc9ea
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jdemeyer):

 * dependencies:  #12555, #12173 =>


Comment:

 Just a few technical comments (I don't plan to formally review this):
 1. You don't need to add `include_dirs = [SAGE_INC + '/flint']`
 2. You don't need to add `__richcmp__` calling `_richcmp`
 3. You don't need to add `__hash__` which just raises `TypeError`: all
 `Element`s are now unhashable by default.
 4. For consistency with other `.pxd` files, could you move all
 declarations of FLINT types to `sage/libs/flint/types.pxd`?
 5. In this block
 {{{
             try:
                 padic_ctx_init(self.ctx, self.fprime, 0, prec_cap,
 PADIC_SERIES)
             except:
                 mpz_clear(self.top_power)
                 raise
 }}}
 given that `padic_ctx_init` is a C function, how could it ever raise a
 Python exception? Moreover, I find it bad style to use `except:`, you
 catch be more explicit and catch `except BaseException:` instead (the
 reason I say this is because most people write `except:` by mistake).

--
Ticket URL: <http://trac.sagemath.org/ticket/14304#comment:63>
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