This all sounds good to me. Aaron Meurer
On Feb 6, 2013, at 12:35 AM, Case Van Horsen <[email protected]> wrote: > Hi, > > A question on the approach you'd like me take. > > I'm setting a value (HAS_GMPY) in sympy.core.compatibility to reflect > if a valid version of gmpy/gmpy2 is available and the version number. > groundtypes.py checks that value to determine which version to import. > polys.domains.__init__.py uses HAS_GMPY and the SYMPY_GROUND_TYPES env > variable to determine which integer type to support. But > groundtypes.py doesn't take SYMPY_GROUND_TYPES into account and will > always import gmpy/gmpy2 if HAS_GMPY is set. It's not a performance > issue since gmpy/gmpy2 has already been imported. > > I'd also like to define couple of constants that contain the valid > integer and rational base types. For example, > > if sys.version_info[0] == '2': > SYMPY_INTS = (int, long) > else: > SYMPY_INTS = (int,) > > if HAS_GMPY and GROUND_TYPES == 'gmpy' > SYMPY_INTS += (type(gmpy.mpz(0)),) > > I'd like to define SYMPY_INTS in sympy.core.compatibility along with > HAS_GMPY. The list of valid base integer types should reflect the > GROUND_TYPES selection in addition to the Python base type(s). Would > it be okay to move the GROUND_TYPES logic to sympy.core.compatibility > and also to reflect the choice for GROUND_TYPES in the setting for > HAS_GMPY? (i.e. if GROUND_TYPES equals 'python', just set HAS_GMPY to > 0, etc.) polys.domains.__init__.py would just import GROUND_TYPES. > > casevh > > -- > You received this message because you are subscribed to the Google Groups > "sympy" 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/sympy?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- You received this message because you are subscribed to the Google Groups "sympy" 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/sympy?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
