From bff73a39759e63842a974db3efe98bab61a9689a Mon Sep 17 00:00:00 2001 From: Reece Dunham Date: Mon, 4 Feb 2019 22:06:08 -0500 Subject: [PATCH] Fix broken python method (#8821) --- demos/python/class1.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/demos/python/class1.py b/demos/python/class1.py index 23209a920..ad9234494 100755 --- a/demos/python/class1.py +++ b/demos/python/class1.py @@ -4,7 +4,9 @@ import json # Define a class with a method that returns JSON class returnsjson: - def method1(this): + def __init__(self): + the_object = self + def method1(self): return json.dumps(['foo', { 'bar': ('baz', None, 1.0, 2), @@ -14,5 +16,4 @@ class returnsjson: 1,2,3]) c = returnsjson() -print (c.method1()) - +print(c.method1())