<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:12pt"><div><span>Nevermind. The effect I'm seeing was from parent class get_memory actions.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal; ">Looks like there is just too much work to attempt inheriting from anything but YaesuCloneModeRadio, and working from there ;)</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal; "><span style="background-color: transparent; ">Anyhow, now trying to wrap my head around how the banks work ;)</span><br></div><div><br></div> <div
style="font-family: tahoma, 'new york', times, serif; font-size: 12pt; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <hr size="1"> <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Jens J. <kd4tjx@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> "chirp_devel@intrepid.danplanet.com" <chirp_devel@intrepid.danplanet.com> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, September 6, 2013 9:12 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> [chirp_devel] problem with class inheritance,        calling parent method w/ super<br> </font> </div> <div class="y_msg_container"><br><div id="yiv3504866616"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: tahoma, 'new york', times, serif; font-size: 12pt; "><div>This may be a general python understanding problem, but I am working on
a VX2 driver, and subclassing from VX3.</div><div>I am then overriding get_features, trying to call super get_features, modify that a bit and return it. The problem is that my change to rf.valid_tuning_steps do not seem to be changing at all. I must be missing some nuance of python here.</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: tahoma, 'new york', times, serif; background-color: transparent; font-style: normal; "><div style="background-color:transparent;">class VX2Radio(vx3.VX3Radio):</div><div>....</div><div><div> def get_features(self):</div><div> rf = super(VX2Radio, self).get_features()</div><div> rf.has_bank = False</div><div>
rf.has_bank_names = False</div><div> rf.valid_modes = list(set(VX2_MODES))</div><div><span style="font-weight:bold;"> rf.valid_tuning_steps = list(VX2_STEPS)</span></div><div> rf.memory_bounds = (1, 1000)</div><div> return rf</div><div>....</div><div><br></div><div><br></div><div>Note, the mutation of rf.memory_bounds does take effect, but it's as if the valid_tuning_steps list in the UI is the original one (wrong order) from VX2Radio, not the one I'm assigning from VX2_STEPS list.</div><div><br></div><div>Any ideas or pointers for a pynewb</div><div><br></div><div>-Jens</div><div><br></div></div></div></div></div></div><br>_______________________________________________<br>chirp_devel mailing list<br><a ymailto="mailto:chirp_devel@intrepid.danplanet.com"
href="mailto:chirp_devel@intrepid.danplanet.com">chirp_devel@intrepid.danplanet.com</a><br><a href="http://intrepid.danplanet.com/mailman/listinfo/chirp_devel" target="_blank">http://intrepid.danplanet.com/mailman/listinfo/chirp_devel</a><br>Developer docs: <a href="http://chirp.danplanet.com/projects/chirp/wiki/Developers" target="_blank">http://chirp.danplanet.com/projects/chirp/wiki/Developers</a><br><br></div> </div> </div> </div></body></html>