On Wednesday, July 28, 2010, kcrisman <kcris...@gmail.com> wrote: > But for True and False, we would rather have > > if n is True: > > not > > if n==True: > > correct? I've seen that cause some problems in code I've reviewed, > where things that shouldn't be True were True. >
I would use If n: If you want to make sure n is a book, do: if isinstance(n,bool) and n: > - kcrisman > > -- > To post to this group, send an email to sage-devel@googlegroups.com > To unsubscribe from this group, send an email to > sage-devel+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/sage-devel > URL: http://www.sagemath.org > -- William Stein Professor of Mathematics University of Washington http://wstein.org -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org