Carl Banks, 16.07.2010 07:50:
On Jul 15, 8:33 pm, Stefan Behnel wrote:
The code I referenced is from the Cython compiler, and we use it to "do
stuff" with the AST. The visitor pattern is actually a pretty common way to
bind code in a single place that does a certain thing to different parts of
a data structure. Without it, if you kept that code *inside* of the data
structure, you'd have to spill the type specific parts all over your code.

Ahh, so this aspect oriented programming is it.

Never thought about it that way, but you have a point there. It's pretty much the same idea as AOP, but without any of those huge and feature drooling code injection frameworks.

Stefan

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to