4343class Keyword (object ):
4444 """The Keyword handler for Test Library instances.
4545
46- - Provides inspection of names, args and docs .
47- - Gets called by Test Library's run_keyword().
46+ * Provides inspection of Keyword name, arguments, and documentation .
47+ * Instances get called by Test Libraries' ``. run_keyword()`` method .
4848 """
4949 def __init__ (self , name , func , libinstance ):
5050 """Initialize with Keyword's display `name`,
@@ -53,30 +53,34 @@ def __init__(self, name, func, libinstance):
5353 self .name = name
5454 self .func = func
5555 self .libinstance = libinstance
56- # Get all ContextHandler classes for which this Keyword
57- # has context-specific implementations,
58- # to implicitly provide additional <context> = switching kwargs:
56+ # Get all ContextHandler-derived classes for which this Keyword
57+ # has context-specific implementations,
58+ # to implicitly provide additional context_name = switching kwargs:
5959 self .context_handlers = set (ctx .handler for ctx in func .contexts )
6060
6161 @property
6262 def __doc__ (self ):
63+ """The Keyword's documentation string,
64+ taken from ``self.func.__doc__``.
65+ """
6366 return self .func .__doc__
6467
6568 @property
6669 def libname (self ):
67- """The Test Library's class and display name.
70+ """The Keyword's Test Library class name,
71+ which also represents the Library's display name.
6872 """
6973 return type (self .libinstance ).__name__
7074
7175 @property
7276 def longname (self ):
73- """The Keyword's full display name (TestLibraryName.Keyword Name).
77+ """The Keyword's full display name (** TestLibraryName.Keyword Name** ).
7478 """
7579 return '%s.%s' % (self .libname , self .name )
7680
7781 def args (self ):
7882 """Iterate the Keyword's argument spec in Robot's Dynamic API style,
79- usable by Test Library's get_keyword_arguments().
83+ usable by Test Libraries' ``. get_keyword_arguments()`` method .
8084 """
8185 # First look for custom override args list:
8286 if self .func .args :
@@ -117,7 +121,7 @@ def args(self):
117121 yield '**options'
118122
119123 def __call__ (self , * args , ** kwargs ):
120- """Call the Keyword's function with the given arguments.
124+ """Call the Keyword's actual function with the given arguments.
121125 """
122126 func = self .func
123127 # look for explicit <session>= and <context>= switching options
0 commit comments