Changes between Version 13 and Version 14 of S3/S3Method
- Timestamp:
- 06/13/14 12:05:11 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
S3/S3Method
v13 v14 11 11 12 12 Function: 13 {{{ 13 {{{#!python 14 14 def my_method_handler(r, **attr): 15 15 return dict() … … 17 17 18 18 Lambda: 19 {{{ 19 {{{#!python 20 20 my_method_handler = lambda r, **attr: dict() 21 21 }}} 22 22 23 23 Class and instance: 24 {{{ 24 {{{#!python 25 25 class MyMethodHandler: 26 26 def __call__(r, **attr): … … 76 76 To implement a method handler as {{{S3Method}}}, you would typically subclass {{{S3Method}}} and implement the {{{apply_method}}} method: 77 77 78 {{{ 78 {{{#!python 79 79 class MyMethodHandler(S3Method): 80 80