Phillip> The way I see it, left-to-right helps reading what's happening Phillip> to the function. For example: Phillip> def foo(cls,...) [contract(blah), classmethod]: Phillip> ... Phillip> clearly says that a contract wrapper is being applied to foo, Phillip> and then it is being made a classmethod. On the off-chance that a default arg initializer has side effects, left-to-right also guarantees that the side effects take place before the decorator expression is evaluated: i = I(...) def foo(a=i.func(...), b, c) [i.w1(...), w2]: ... Evaluating i.func(...) might have some effect on the execution of i.w1(...). I don't claim that's necessarily a good property to rely on, but if reading order matches evaluation order it makes for fewer surprises. Phillip> If the order were the other direction, it would force you to Phillip> read right-to-left in order to know what's going to happen to Phillip> the function. Phillip> So, I vote for left-to-right on the grounds of "readability Phillip> counts". :) +1. Skip
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4