get a self data in a method call

polux polux2001 at wanadoo.fr
Sun Dec 22 18:13:28 EST 2002


I've a class

class MyClass:
	
	def __init__(self):
		self.data = 123


now, I want to define a method, which would be like that if it were 
possible :

	def func(self, data = self.data )

but it doesn't work because python does't know yet what "self" is



please help


ps : excuse my poor english




More information about the Python-list mailing list