Python Macros

Diez B. Roggisch deetsNOSPAM at web.de
Mon Oct 4 14:10:13 EDT 2004


> :Local overhead???  Private branch???  How come?  I'm extending the
> language not adding another Python interpreter.

In fact, you do. As long as you don't implement it as mere preprocessor -
then of course, you can do what you want.

> I was thinking Scheme.

Nope, there is no such thing - if you want it, use scheme/lisp.

> Not sure I understand you here.  I want to implement messages like in
> ObjC where if you send a msg to an object and that object does know what
> to do with it, it can send the obj automatically to another object which
> might know what to do with it.

Not sure what you mean by this, as I never used ObjC - I suppose you wanted
to say "that object does *not* know what to do with it". Unless you get a
bit more specific, I can't suggest something more concrete, but I bet
metaclasses can come handy here - after all, writing delegating classes in
python using them (and other techniques) is easy and sounds like an
approach to what you might want.

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list