I think we can make regular expressions that will match Integers, floating points etc. Something along the lines of this
for int -> re.compile('^\d+$') for float -> re.compile('^\d+\.\d+$') What do you think about it? Saurabh On Saturday, June 21, 2014 11:07:52 AM UTC+5:30, Saurabh Jha wrote: > > Hey all, > > I am looking for a function that can give me the domain of a number taking > number as argument. For example, > > >>> find_domain(2) > ZZ > >> find_domain(2/3) > QQ > > I wonder if this thing is already implemented in Polys module or > elsewhere. If not, I think this should not be very difficult to implement > using inbuilt 're' module of python. I can submit a PR regarding this thing > > Saurabh > -- 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 sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/1888d20c-1684-4a06-9ba4-5a071a284b2c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.