diff options
-rw-r--r-- | template/python/base-class.py | 8 | ||||
-rw-r--r-- | template/python/snip-class.py | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/template/python/base-class.py b/template/python/base-class.py index 9ea3b27..ba7c7d8 100644 --- a/template/python/base-class.py +++ b/template/python/base-class.py @@ -2,6 +2,8 @@ {{_name_}} """ -class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}: - def __init__(self): - {{_cursor_}} +class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}(object): + def __init__(self{{_cursor_}}): + + def __repr__(self): + return diff --git a/template/python/snip-class.py b/template/python/snip-class.py index c8ff23c..aee2e08 100644 --- a/template/python/snip-class.py +++ b/template/python/snip-class.py @@ -1,3 +1,5 @@ -class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}: - def __init__(self): - {{_cursor_}} +class {{_expr_:substitute('{{_input_:name}}', '\w\+', '\u\0', '')}}(object): + def __init__(self{{_cursor_}}): + + def __repr__(self): + return |