On 08/06/2010 17:04, Ross Williamson wrote:
Hi Everyone,

Just a quick question - Is it possible to assign class variables in
the __init__() - i.e. somthing like:
They're instance variables, not class variables.

def __init__(self,self.source = "test", self.length = 1)
No.

rather than

def __init__(self,source = "test", length = 1):


Why not try this from an interactive prompt, quicker than posting and waiting for a reply?

Kindest regards.

Mark Lawrence.


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to