Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/PowerShell/PowerShell.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorReece Dunham <jumbocakefdx@gmail.com>2019-02-05 06:06:08 +0300
committerIlya <darpa@yandex.ru>2019-02-05 06:06:08 +0300
commitbff73a39759e63842a974db3efe98bab61a9689a (patch)
treef0d2a41fe8b3a908e99f418a92cca9b3cdc09078 /demos
parentec12f373ecd59769554ec7ee675233d898495c46 (diff)
Fix broken python method (#8821)
Diffstat (limited to 'demos')
-rwxr-xr-xdemos/python/class1.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/python/class1.py b/demos/python/class1.py
index 23209a9208..ad92344945 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())