B
Brian Munroe
I am just starting to learn the OO side of Python scripting, and I am
a little confused on the following. Take the following example class:
z = 1
def __init__(self):
self.x = 2
I was wondering if someone could explain if there is any difference
between initalizing your object attributes up in the __init__
constructor or setting them up as (I am guessing at the name here)
object level variables (like z)
thanks
-- brian
a little confused on the following. Take the following example class:
z = 1
def __init__(self):
self.x = 2
I was wondering if someone could explain if there is any difference
between initalizing your object attributes up in the __init__
constructor or setting them up as (I am guessing at the name here)
object level variables (like z)
thanks
-- brian