Comment
Comment by reipahb
Actually, what you get when referencing x.test in Python is a bound method:
I really like this behavior in Python. Unfortunately, JavaScript does not behave the same way, as you see in the last couple of lines in your example. You can however get the same result by manually binding the method to the object: