setting python object property not changing value : <p>If you look at my code below, I'm creating a FileNode and passing it the string(filename). When the filename setter is triggered it should then populate the remaining fields, however it doesn't appear to work. </p>

<p>I'm currently just trying to test setting the property 'extension' within the 'filename' setter, but it doesn't seem to change the property, Why is this?</p>

<pre><code>import os
import pprint

class FileNode(object):
    def __init__(self, filename):
        self.filename = filename
        self.show = ""
        self.episode = ""
        self.sequence = ""
        self.shot = ""
        self.task = ""
        self.version = ""
        self.extension = ""
        self.isValid = False

    @property
    def filename(self):
        return self.filename

    @property
    def extension(self):
        return self.extension

    @filename.setter
    def filename(self, value):
        self._filename = value

        fl, ex = os.path.splitext(value)
        self._extension = "candles"

    @extension.setter
    def extension(self, value):
        self._extension = value



a = FileNode("BTMAN_1005_001_007_model_cup_v001.max")
# print (vars(a))
pp = pprint.PrettyPrinter(depth=6)
pp.pprint(vars(a))

b = FileNode("BTMAN_1005_001_007_model_v001.max")
# print (vars(b))
pp = pprint.PrettyPrinter(depth=6)
pp.pprint(vars(b))
</code></pre>
