Brian Blais wrote:

> TypeError: unbound method pyrex_update_within_class() must be called 
> with update_funcs instance as first argument (got str instance instead)

Hm. Okay, so that doesn't work either.

But I just tried the following, and it seems
to work:

    import new

    class C(str):
       pass

    C.ord = new.instancemethod(ord, None, C)

    c = C("a")

    print c.ord()

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

Reply via email to