From 72616f6f293956a8e4a4016ad0d3287ee872cdbd Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 22 Aug 2015 21:04:23 +0800 Subject: [PATCH] language: document HasEnvironment.dbs --- artiq/language/environment.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/artiq/language/environment.py b/artiq/language/environment.py index c8c3acaf9..8a90f51cf 100644 --- a/artiq/language/environment.py +++ b/artiq/language/environment.py @@ -133,6 +133,15 @@ class HasEnvironment: raise NotImplementedError def dbs(self): + """Returns the device manager, the parameter database and the result + database, in this order. + + This is the same order that the constructor takes them, allowing + sub-objects to be created with this idiom to pass the environment + around: :: + + sub_object = SomeLibrary(*self.dbs()) + """ return self.__dmgr, self.__pdb, self.__rdb def get_argument(self, key, processor=None):