[pytango] 388/483: Add support for attribute as decorator

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:15:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.

commit f1911530aa682d53f1c84b68ec8f0fd86050c198
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date:   Thu May 15 17:26:23 2014 +0000

    Add support for attribute as decorator
    
    git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@25636 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
 doc/howto.rst | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/doc/howto.rst b/doc/howto.rst
index 2192f87..06001b5 100644
--- a/doc/howto.rst
+++ b/doc/howto.rst
@@ -101,12 +101,11 @@ high level API
     class Clock(Device):
         __metaclass__ = DeviceMeta
 
-        time = attribute()
-
-        def read_time(self):
+        @attribute
+        def time(self):
             return time.time()
 
-        @command(din_type=str, dout_type=str)
+        @command(dtype_in=str, dtype_out=str)
         def strftime(self, format):
             return time.strftime(format)
 
@@ -130,7 +129,7 @@ high level API
 **line 10**
     definition of the *time* attribute. By default, attributes are double, scalar, 
     read-only. Check the :class:`~PyTango.server.attribute` for the complete
-    list of attribute options
+    list of attribute options.
 
 **line 12-13**
     the method that is called when a client reads the *time* attribute from this

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git



More information about the debian-science-commits mailing list