View Single Post
Old Feb 20th, 2007, 9:17 AM   #5
ptmcg
Newbie
 
Join Date: Aug 2005
Location: Austin, TX
Posts: 15
Rep Power: 0 ptmcg is on a distinguished road
:beard: I guess my OO training from Smalltalk/C++/Java days is still showing, I instinctively jump to writing a class, especially since Python offers such nice built-in class impersonation features, such as classes as numerics (for operator overloading) or classes as callables.

After I posted that last note, it dawned on me that a simple closure (as Arevos so clearly showed) would do just as well. I think I'll revisit pyparsing one of these days and see how much "class overkill" can be winnowed out.

Fortunately, I *can* be trained...
ptmcg is offline   Reply With Quote