How would I call a function within a class from the same class in python github


–1 vote
asked Mar 16, 2016 by Lbhso (1,020 points)
Given this basic example, but in reality it's more complex:(Name of file is TestFile)class Example: def test1(): print("First test") def test2(): print("Second test")

4 Answers

0 votes
answered Jun 2, 2016 by delete_Dai (830 points)
selected Jun 4, 2016 by Mcgartlandof
 
Best answer
I have been having this problem too
Generated code from [Tutor] Calling a function within a function within a class... without an app
0 votes
answered Apr 12, 2016 by Sillett (960 points)
Using Classes within another class. Associating link colour within another class.
commented Apr 14, 2016 by bcc_7216_Hai (460 points)
I have run into this problem in two scenarios
0 votes
answered May 9, 2016 by be6978 (200 points)
If you would like to see more how this work with a live example
Most of the example is taken from Python Functions - Tutorialspoint
–1 vote
answered May 29, 2016 by Vf933 (170 points)
Just note that this commands can be very destructive. Lastly, I hope by now you have seen http://anh.cs.luc.edu/python/hands-on/3.1/handsonHtml/functions.html
commented May 31, 2016 by Ohg6594Brai (140 points)
I see that this question became popular so I post my actual solution

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!







...