Set run vars with each call

Alister Ware alister.ware at ntlworld.com
Tue Jul 12 16:46:01 CEST 2011


On Tue, 12 Jul 2011 06:32:32 -0700, Gnarlodious wrote:

> Question. Is there a special method or easy way to set default values
> with each call to an instance? Any ideas to make it easier? What I want
> to do is have a constantly updating set of values which can be
> overridden. Just thought there was an easy way to set that up.
> 
> -- Gnarlie

I thought that was the role of the __init__ function

class Something:
	def __init__(self):
		self.value="some value"




-- 
No matter how subtle the wizard, a knife in the shoulder blades will 
seriously
cramp his style.



More information about the Python-list mailing list