On Sun, Nov 6, 2016 at 12:50 AM, Arthur Havlicek
<arthurhavli...@gmail.com> wrote:
> 2016-11-05 12:47 GMT+01:00 Chris Angelico <ros...@gmail.com>:
>
>> On Sat, Nov 5, 2016 at 9:50 PM, Arthur Havlicek
>>
>> But here's the thing. For everyone who writes a decorator function,
>> there could be dozens who use it.
>>
>
> The day that one guy leaves the team, suddenly you have code that's become
> a bit tricky to maintain.

True, and this can become a problem when those dozens have no
comprehension of how these features work. But fortunately, all it
takes is for one person to step up and learn how decorators are
written, and the problem is solved. (And it's not that hard. We teach
decorator authorship in our Web Programming In Python course. Not in a
huge amount of detail, but enough that a student will be able to
carefully tease apart the code of a decorator function and figure out
what it's actually doing.)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to