This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python] A case for "mixed" pretty-printers


Paul>   const char *to_string () const; // Pretty printer

Paul> Imagine that the internal state of Foo is somewhat complicated,
Paul> and that to_string() method takes significant C++ code to implement
Paul> (not something easily re-coded in Python) and already exists.

Paul> But what I really want is a mixture, in which Python pretty
Paul> printer calls the application one [1]:

Paul> How difficult would this be to achieve?

As long as the application printer constructs some kind of
stringlike-object (as opposed to printing directly to stdout or
something), it is not hard.  I think all that is required is to
implement inferior function calls via Value.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]