It could work if we extend syntax like this:
```python
class Neuron:
activation # By default creates activation with None value
activation = linear_activation(activation)
```
and then we could apply as may decorators as needed:
```python
class Neuron:
activation # By default creates activation with None value
activation = linear_activation(activation)
activation = softmax_activation(weights=["w0",
"w1"])(linear_activation(activation))
```
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/I7LHY3X3MV4U36VHKHK3B3L2QNHWG42T/
Code of Conduct: http://python.org/psf/codeofconduct/
- [Python-ideas] Decorators for class non function propert... redradist
- [Python-ideas] Re: Decorators for class non functio... Chris Angelico
- [Python-ideas] Re: Decorators for class non fun... Joao S. O. Bueno
- [Python-ideas] Re: Decorators for class non fun... redradist
- [Python-ideas] Re: Decorators for class non... Serhiy Storchaka
- [Python-ideas] Re: Decorators for class... redradist
- [Python-ideas] Re: Decorators for ... Chris Angelico
- [Python-ideas] Re: Decorators ... redradist
- [Python-ideas] Re: Decorators for class... Greg Ewing
- [Python-ideas] Re: Decorators for ... Dominik Vilsmeier
- [Python-ideas] Re: Decorators ... Marco Sulla
- [Python-ideas] Re: Decorat... Ricky Teachey
- [Python-ideas] Re: Decorat... Marco Sulla
- [Python-ideas] Re: Decorat... Ricky Teachey
- [Python-ideas] Re: Decorat... David Mertz
- [Python-ideas] Re: Decorat... Ricky Teachey
