python - False is not true error? -


i'm trying set global definitions true, i'm getting error saying "assertionerror: false not true"

from instructions: 'only things expected constant should defined globals. true of these.'

#global definitions = true down = true left = true right = true dirs = [up, down, left, right]  #a bunch of code follows here 

this 1 of errors (for up) i've been getting.

self.asserttrue(isinstance(up,direction)) assertionerror: false not true 

i have separate class called direction created. furthermore, have create attribute must 1 of up, down, left, , right i'm not sure how that.

attribute: value::str. must 1 of "up", "down", "left", or "right".

#direction class class direction:      value = dirs 

isinstance() return true if instance of direction. not instance of direction. boolean. hence, isinstance(up,direction) returns false.

now, asserting true. not. hence assertion error, false not true.


Comments