~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/__init__.py

  • Committer: Matt Giuca
  • Date: 2010-02-25 07:14:40 UTC
  • Revision ID: matt.giuca@gmail.com-20100225071440-g4isav3g3g8q8lhu
Replace 'is not 0' with '!= 0'. 'is not' is a reference check which is dangerous on ints -- it assumes they are interned which is probably, but not necessarily, true.

Show diffs side-by-side

added added

removed removed

Lines of Context:
538
538
 
539
539
        # If get, display a delete confirmation page
540
540
        else:
541
 
            if self.context.worksheet_exercises.count() is not 0:
 
541
            if self.context.worksheet_exercises.count() != 0:
542
542
                self.template = 'templates/exercise_undeletable.html'
543
543
 
544
544
        # Variables for the template