- 1

Explain this piece of code please 🙏🙏🙏

class BirbLang: def __init__(self, program): self.program = program @staticmethod

15th Nov 2019, 3:55 PM
Thakur Lion😎😎
Thakur Lion😎😎 - avatar
2 odpowiedzi
+ 6
Hello! Seems you found my BirbLang code 😅 If you're referring to the contents of the __init__() function, all it really does is once the class gets initialized, the variable self.program within the class will be set to whatever value is entered through the program parameter. For example, if the following line appears somewhere in the code: x = BirbLang(code) whatever value is held within code will be given to self.program for the instance of the class stored in x.
16th Nov 2019, 12:54 AM
Faisal
Faisal - avatar
+ 1
There is nothing to explain, it's incomplete, and it does nothing. Everything is explained in the course, where exactly do you have a confusion ?
15th Nov 2019, 4:17 PM
Aymane Boukrouh
Aymane Boukrouh - avatar