0
20th Dec 2018, 5:26 PM
Kartheek b.katheek
Kartheek b.katheek - avatar
10 ответов
+ 7
https://code.sololearn.com/cd3AGES5oaYL/?ref=app
20th Dec 2018, 7:40 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 7
When you call it with an instance it's passed to method's first argument but when you write "test.m1()" you call it with missing arguments so Python raises error https://code.sololearn.com/cNMopSAbbVaX/?ref=app https://realpython.com/instance-class-and-static-methods-demystified/#instance-methods
20th Dec 2018, 7:54 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 5
You need an instance to call normal methods test().m1()
20th Dec 2018, 5:50 PM
Mert Yazıcı
Mert Yazıcı - avatar
+ 4
Yes
20th Dec 2018, 7:01 PM
Mert Yazıcı
Mert Yazıcı - avatar
0
Did you run the code what I posted
20th Dec 2018, 6:58 PM
Kartheek b.katheek
Kartheek b.katheek - avatar
0
I got error even I ran the code
20th Dec 2018, 7:21 PM
Kartheek b.katheek
Kartheek b.katheek - avatar
0
I got no error when I run code after creating an object
20th Dec 2018, 7:22 PM
Kartheek b.katheek
Kartheek b.katheek - avatar
0
In my code I call the instance method test.m1().even though I got error
20th Dec 2018, 7:25 PM
Kartheek b.katheek
Kartheek b.katheek - avatar
0
Can send your code that was done by you
20th Dec 2018, 7:26 PM
Kartheek b.katheek
Kartheek b.katheek - avatar
0
Why it is not possible with test.m()
20th Dec 2018, 7:42 PM
Kartheek b.katheek
Kartheek b.katheek - avatar