From cc56d6a8bed321cd207fa3453767233d56a9ad78 Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Thu, 22 Jun 2017 10:47:27 +0200 Subject: [PATCH] add submodule attributes to base --- qcodes/instrument/base.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qcodes/instrument/base.py b/qcodes/instrument/base.py index 5776cbdb1a4..1e15297fafa 100644 --- a/qcodes/instrument/base.py +++ b/qcodes/instrument/base.py @@ -209,14 +209,14 @@ def print_readable_snapshot(self, update=False, max_chars=80): submodule.print_readable_snapshot(update, max_chars) # - # shortcuts to parameters & setters & getters # + # shortcuts to parameters & setters & getters # # # instrument['someparam'] === instrument.parameters['someparam'] # # instrument.someparam === instrument.parameters['someparam'] # # instrument.get('someparam') === instrument['someparam'].get() # # etc... # # - delegate_attr_dicts = ['parameters', 'functions'] + delegate_attr_dicts = ['parameters', 'functions', 'submodules'] def __getitem__(self, key): """Delegate instrument['name'] to parameter or function 'name'.""" @@ -599,6 +599,3 @@ def ask_raw(self, cmd): raise NotImplementedError( 'Instrument {} has not defined an ask method'.format( type(self).__name__)) - - delegate_attr_dicts = ['parameters', 'functions', 'submodules'] -