05.08.20 10:36, [email protected] пише:
> 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 -- [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/XALTCALO7DMMRGUSNLY5X2DY2BEL22ZM/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to