[IPython-dev] Next-gen result printing using generics

Ville M. Vainio vivainio at gmail.com
Sat May 26 05:43:35 EDT 2007

Simplegeneric rocks.

Coming soon to SVN, once I clean it up (remove deco syntax etc.):


from IPython.generics import result_display

def print_lsstring(arg):
    print "LSString (.p, .n, .l, .s available). Value:"
    print arg


In [4]: from IPython.genutils import *

In [5]: LSString("hello\nworld")
Out[5]: LSString (.p, .n, .l, .s available). Value:

In [6]:

Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'

More information about the IPython-dev mailing list