On Tue, 16 Dec 2008 01:03:55 +0000, Alan Gauld wrote: > "Marc Tompkins" <marc.tompk...@gmail.com> wrote > >> If you're just starting out in Python, decorators can be hard to get >> your head around... > > I've been using Python for oover 10 years and still find decorators hard > to get my head around! :-) > > I confess I'm not a fan, they go against the Python spirit of explicit > is best in my opinion. If I'm calling a function I like to know I'm > calling a function... I know they make the code look pretty but IMHO > they are a pain to debug and I'm never totally convinced I've got it > exactly right.
I usually think about decorator as a tag or marker instead of function calling. When I put the property decorator, I'll be thinking about attaching a property tag to the function so the interpreter would handle the function as if it is a property. This way, I don't think of it as implicit function calling but as an explicit tag (how the tag system works is a detail I need not to care). _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor