python giving function as output? -


my python function supposed merely print variables multitude of functions single line, target.get_target_type outputting don't understand have no idea how fix it. expected output string literal of 'x' or 'y'.

the output:

target behavior:     <function target.get_target_type @ 0x102d89620> pursuer behavior:      x   mis-match 

from function:

def interaction_report(self):            print("target behavior: \t", target.get_target_type,  "pursuer behavior: \t", self.pursue_type, "\t", self.match_string) 

refers to:

def get_target_type(self):               return self.__target_type 

you need call function (e.g. target.get_target_type() instead of target.get_target_type. if don't call it, end reference callable function object itself.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -