Marc 'BlackJack' Rintsch wrote:

On Fri, 03 Oct 2008 19:10:27 +1200, greg wrote:

(BTW, try doing that with the x.len() notation!)

def size(obj):
    return obj.len()

or

size = operator.methodcaller('len')

No, what I meant was that if the normal way of getting
the len of something were to write x.len() instead of
len(x), you wouldn't be able to globally substitute
that syntax with x.size().

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

Reply via email to