cbc2eed900
defclass now has a new syntax: (defclass Name [BaseList] [property value property value] ;; optional (defn method [self] self.property)) Anything after the optional property list (which will be translated to a setv within the class context) will be added to the class body. This allows one to have side effects and complex expressions within the class definition. As a side effect, defining methods is much more friendly now! Closes #850. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org> |
||
---|---|---|
.. | ||
contrib | ||
__init__.hy | ||
cons.hy | ||
core.hy | ||
defclass.hy | ||
language.hy | ||
mathematics.hy | ||
native_macros.hy | ||
py3_only_tests.hy | ||
quote.hy | ||
reader_macros.hy | ||
shadow.hy | ||
unless.hy | ||
when.hy | ||
with_decorator.hy | ||
with_test.hy |