05.08.20 10:36, redrad...@gmail.com пише: > Decorator will do the same thing as general decorator
So the code class Neuron: @linear_activation activation would be equivalent to the following code? class Neuron: activation activation = linear_activation(activation) This code does not work unless you define global name "activation", and if define it, the code can be written as class Neuron: activation = linear_activation(activation) I do not see reasons to introduce special syntax for this very specific code. _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/XALTCALO7DMMRGUSNLY5X2DY2BEL22ZM/ Code of Conduct: http://python.org/psf/codeofconduct/