clustershell
clustershell copied to clipboard
Add task_self() next gen
In ClusterShell code examples, most of the time, task_self()
is copied in a local task
variable because this is nicer to use. That means that task_self()
name is not a good one and the first thing people do is the rename it!
In consequence, a better name should be find and available to refer to the same concept.
- this should not be a function!
Maybe:
-
mytask
(it sounds like a bit a VisualBasic :)) - ... ?
[st-cea] I prefer curtask
. But it cannot be a simple variable as its value would get the task object associated to the thread importing the module. Moreover, it's not trivial to add a property to a module.
- http://docs.python.org/library/functions.html#property
- http://stackoverflow.com/questions/880530/can-python-modules-have-properties-the-same-way-that-objects-can
Hmm..