[EMAIL PROTECTED] wrote:
> In fact, i want to sort the list based on the 'allocated attribute' and
> at the same time, test membership based on the id attribute.
> __cmp__ logically implies an ordering test

really?

    http://dictionary.reference.com/search?q=compare

    com·pare
    v. com·pared, com·par·ing, com·pares
    v. tr.
    1. To consider or describe as similar, equal, or analogous; liken.
    2. To examine in order to note the similarities or differences of.
    /.../

> not an identity test.

it's not an identity test.  it's a comparision, and the "in" operator
uses it to determine *equality*, not identity.  you need to read
up on object comparisions in the reference manual.

</F>



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

Reply via email to