"Ron Adam" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Jim Jewett wrote:
>
>> The end result is that even if I find a solution that works, I think
>> it will be common (and bug-prone) enough that it really ought to be in
>> the language, or at least the standard library -- as it is today for
>> objects that don't go out of their way to prevent it.

Id() *is* in builtins.  Now that sort has a key parameter, I think an 
explicit 'key = id' qualifies enough as 'in the language' for something 
used not too often.

> The usual way to handle this in databases is to generate an unique
> id_key when the data is entered.

Which is what Python does when objects are created.

>  That also allows for duplicate entries
> such as people with the same name, or multiple items with the same part
> number.

Or multiple objects with the same value.

Terry Jan Reedy



_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to