Casey works with some pretty courteous and forward thinking Python developers. They want to make sure that using their APIs are as convenient as possible, and make sure to provide all sorts of useful convenience methods. Like this one:
def request(self): """ just for convenience """ return self
For the non-Python folks,
self is the Python equivalent of
this in other languages, and it has to be passed as a parameter because Python is weird. So this method allows you to call
request on an object to get the object you just called
As Casey describes it: "That's pretty convenient!"
This post originally appeared on The Daily WTF.