On 3 Jun., 21:41, Ronan Lamy <ronan.l...@gmail.com> wrote: > > Yeah, ZZ, QQ, etc. are all just about syntactic sugar that makes things > > much shorter to type. You can do all of the stuff equivalently in much > > longer forms. And by the way, the ZZ[x] syntax just exists because > > that's the mathematical notation (the square brackets). The real > > confusing thing is that ZZ(x) is not the field of rational functions in > > x with integer coefficients (for that you need ZZ.frac_field(x)). > > A lot of time is wasted for the sake of a few keystrokes. To understand > anything using "domains", you need to unpick all the levels of > indirection (e.g. ZZ = ZZ_python = PythonIntegerRing which is a wrapper > for PythonIntegerType = int) and understand of a lot of methods and > syntactic shortcuts. It's much easier to understand 'isinstance(a, > int_type)' than 'ZZ.of_type(a)', even if the latter is shorter.
Shouldn't 'ZZ.of_type(a)' rather be 'ZZ.contains(a)' or 'a in ZZ', for the sake of consistency with mathematical notation? Vinzent -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com. To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.