diff options
author | Sebastien Martini <seb@dbzteam.org> | 2009-11-07 02:48:51 +0100 |
---|---|---|
committer | Sebastien Martini <seb@dbzteam.org> | 2009-11-07 02:48:51 +0100 |
commit | 649429ae8af743d9c404c1cc219bd018ae073578 (patch) | |
tree | 9b55f3562a3111374248703bbae1edc7aac36a4d | |
parent | 213ca585c2b0101aa5b8d77bc2708bfaefa38bc3 (diff) | |
download | pyinotify-649429ae8af743d9c404c1cc219bd018ae073578.tar.gz |
Updated comments.
-rwxr-xr-x | python2/pyinotify.py | 22 | ||||
-rwxr-xr-x | python3/pyinotify.py | 22 |
2 files changed, 24 insertions, 20 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py index 9edd873..e923829 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -814,8 +814,8 @@ class ProcessEvent(_ProcessEvent): behavior can be overriden: Note: you should not override __init__ in your subclass instead define - a my_init() method, this method will be called from the constructor of - this class with its optional parameters. + a my_init() method, this method will be called automatically from the + constructor of this class with its optionals parameters. 1. Provide specialized individual methods, e.g. process_IN_DELETE for processing a precise type of event (e.g. IN_DELETE in this case). @@ -835,9 +835,9 @@ class ProcessEvent(_ProcessEvent): @param pevent: Optional callable object, will be called on event processing (before self). @type pevent: callable - @param kargs: This constructor is a implemented as a template method - delegating its optionals keyworded arguments to the method - my_init(). + @param kargs: This constructor is implemented as a template method + delegating its optionals keyworded arguments to the + method my_init(). @type kargs: dict """ self.pevent = pevent @@ -845,11 +845,13 @@ class ProcessEvent(_ProcessEvent): def my_init(self, **kargs): """ - This method is called from base constructor ProcessEvent.__init__(). - This method is useless here and is meant to be redifined in a - subclass of ProcessEvent. In effect, when subclassing just override - this method if you want to provide custom initialization to your - subclass' instance. You MUST pass keyword arguments though. + This method is called from ProcessEvent.__init__(). This method is + empty here and must be redefined to be useful. In effect, if you + need to specifically initialize your subclass' instance then you + just have to override this method in your subclass. Then all the + keyworded arguments passed to ProcessEvent.__init__() will be + transmitted as parameters to this method. Beware you MUST pass + keyword arguments though. @param kargs: optional delegated arguments from __init__(). @type kargs: dict diff --git a/python3/pyinotify.py b/python3/pyinotify.py index 4c5047f..d3c5013 100755 --- a/python3/pyinotify.py +++ b/python3/pyinotify.py @@ -779,8 +779,8 @@ class ProcessEvent(_ProcessEvent): behavior can be overriden: Note: you should not override __init__ in your subclass instead define - a my_init() method, this method will be called from the constructor of - this class with its optional parameters. + a my_init() method, this method will be called automatically from the + constructor of this class with its optionals parameters. 1. Provide specialized individual methods, e.g. process_IN_DELETE for processing a precise type of event (e.g. IN_DELETE in this case). @@ -800,9 +800,9 @@ class ProcessEvent(_ProcessEvent): @param pevent: Optional callable object, will be called on event processing (before self). @type pevent: callable - @param kargs: This constructor is a implemented as a template method - delegating its optionals keyworded arguments to the method - my_init(). + @param kargs: This constructor is implemented as a template method + delegating its optionals keyworded arguments to the + method my_init(). @type kargs: dict """ self.pevent = pevent @@ -810,11 +810,13 @@ class ProcessEvent(_ProcessEvent): def my_init(self, **kargs): """ - This method is called from base constructor ProcessEvent.__init__(). - This method is useless here and is meant to be redifined in a - subclass of ProcessEvent. In effect, when subclassing just override - this method if you want to provide custom initialization to your - subclass' instance. You MUST pass keyword arguments though. + This method is called from ProcessEvent.__init__(). This method is + empty here and must be redefined to be useful. In effect, if you + need to specifically initialize your subclass' instance then you + just have to override this method in your subclass. Then all the + keyworded arguments passed to ProcessEvent.__init__() will be + transmitted as parameters to this method. Beware you MUST pass + keyword arguments though. @param kargs: optional delegated arguments from __init__(). @type kargs: dict |