Mar-22-2018, 09:43 PM
(Feb-14-2018, 03:01 AM)GalacticStarfish Wrote: A suggestion is that decorators be extended to make the earlier example valid syntax.
That is, the following two pieces of code would produce the same behavior.
@give_extra_functionality foo #################################### foo = give_extra_functionality (foo)
Good lord, I hope not. That looks like a do-nothing statement, not a late-bound decorator. A decorator fundamentally changes what a function is, having that separated from the function definition doesn't seem to make practical sense.