if attr[:12] == '_Request__r_':
name = attr[12:]
if hasattr(Request, 'get_' + name):
getattr(self, 'get_' + name)()
return getattr(self, attr)
raise AttributeError, attr
def get_method(self):
if self.has_data():
return "POST"
else:
return "GET"
raise AttributeError, attr
^
SyntaxError: invalid syntax
How do I fix this error? As you can see above I have added the lines of code giving me an error.