May-29-2018, 04:28 PM
Hi all. I am Administrator. With Notepad: I go to correct the error, then I click on "save" icon, then I go to Command Prompt and run with "python Filename".
But with ptpython , where to correct, where to save, where to run.
Beside that , At the bottom, right corner I have "Meta+Enter Execute". What is it ?
Also at the bottom I have "History". I should like to use that, but I don't know how.
But with ptpython , where to correct, where to save, where to run.
Beside that , At the bottom, right corner I have "Meta+Enter Execute". What is it ?
Also at the bottom I have "History". I should like to use that, but I don't know how.
Error:C:\Users\Sylvain
λ ptpython
>>> class Selfless:
... def __init__(Self, data):
... self.data=data
... def selfless(arg1,arg2):
... return arg1+arg2
... def normal(self,arg1,arg2):
... return self.data+arg1+arg2
>>> X=Selfless(2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in __init__
NameError: name 'self' is not defined
name 'self' is not defined
>>>