123456789101112131415161718192021222324 |
- # -*- coding: utf-8 -*-
- # name: class
- # key: class
- # --
- class ${1:ClassName}(${2:object}):
- def __init__(self, $4):
- super($1, self).__init__()
- ${4:$
- (mapconcat
- '(lambda (x)
- (if (not (string= (nth 0 x) ""))
- (concat "self._" (nth 0 x) " = " (nth 0 x))))
- (mapcar
- '(lambda (x)
- (mapcar
- '(lambda (x)
- (replace-regexp-in-string "[[:blank:]]*$" ""
- (replace-regexp-in-string "^[[:blank:]]*" "" x)))
- x))
- (mapcar '(lambda (x) (split-string x "="))
- (split-string text ",")))
- (concat "\n" (make-string (current-column) 32)))
- }
- $0
|