Skip to content

Commit

Permalink
Fix broken python method (PowerShell#8821)
Browse files Browse the repository at this point in the history
  • Loading branch information
RDIL authored and iSazonov committed Feb 5, 2019
1 parent ec12f37 commit bff73a3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions demos/python/class1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

# 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),
Expand All @@ -14,5 +16,4 @@ def method1(this):
1,2,3])

c = returnsjson()
print (c.method1())

print(c.method1())

0 comments on commit bff73a3

Please sign in to comment.