June 19th, 2004, 12:22 AM
Python does have private and public methods (no protected though). If you prefix a method name with __, then it is only visible within that class.
print "Hello from Method 1"
print "Method 2"
In the above code, method1() and method3() are public and can be accessed from other modules, but __method2() can only be accessed from within this class.
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne