Hi, Maybe this helps:
a=[1,2.3] print isinstance(a,list) True a=67 print isinstance(a,Integer) True Roland On 7 mei, 23:49, Nathann Cohen <nathann.co...@gmail.com> wrote: > Thank you !!! :-) > > Would there be any way to do the same thing without having to import > RR in all of my functions, though ? It's really mainly to distinguish > numerical values from different types, so I thought there may be a > Python way to do it ... Though it perfectly works like that ! :-) > > Nathann > > On 7 May 2010 17:41, Robert Bradshaw <rober...@math.washington.edu> wrote: > > > > > Try doing > > > x in RR > > > - Robert > > > On May 7, 2010, at 2:38 PM, Nathann Cohen wrote: > > >> Hello everybody !!! > > >> I am trying to find out how to check whether some Sage variable is > >> numerical (let's say real, as opposed to None, False, {}, Set([]), > >> etc..), but was not lucky on Google... ^^; > > >> Do you know the function I am looking for ? :-) > > >> Thank youuuuuu !!! > > >> Nathann > > >> -- > >> To post to this group, send email to sage-support@googlegroups.com > >> To unsubscribe from this group, send email to > >> sage-support+unsubscr...@googlegroups.com > >> For more options, visit this group at > >>http://groups.google.com/group/sage-support > >> URL:http://www.sagemath.org > > > -- > > To post to this group, send email to sage-support@googlegroups.com > > To unsubscribe from this group, send email to > > sage-support+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/sage-support > > URL:http://www.sagemath.org > > -- > To post to this group, send email to sage-support@googlegroups.com > To unsubscribe from this group, send email to > sage-support+unsubscr...@googlegroups.com > For more options, visit this group > athttp://groups.google.com/group/sage-support > URL:http://www.sagemath.org -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org