This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients Arfrever, barry, eli.bendersky, eric.araujo, eric.smith, ethan.furman, mrabarnett, pitrou, r.david.murray, rhettinger, sbt, serhiy.storchaka, theller, tim.peters, vstinner
Date 2013-09-12.14:08:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378994917.07.0.563977426606.issue18986@psf.upfronthosting.co.za>
In-reply-to
Content
On 09/11/2013 02:39 PM, Tim Delaney wrote on PyDev:
> 
> I would think that retrieving the keys from the dict would return the transformed keys (I'd 
> call them canonical keys).

The more I think about this the more I agree.  A canonicaldict with a key function that simply stored the transformed key and it's value would seem to be a lot simpler:

  - no need to store a separate "presentation" key
  - no confusion about which of the first key/last key seen is stored
  - no mistakes with the "first" key not being added before real data
    and getting the presentation key wrong

Further, in order to store the non-canonical keys a separate list must be kept of the keys to preseed the canonicaldict; if we store the canonical keys a separate list must be kept for presentation purposes -- so worst case scenario we're keeping the same amount of information and best-case scenario the presentation of the keys doesn't matter and we just saved ourselves an extra data structure.
History
Date User Action Args
2013-09-12 14:08:37ethan.furmansetrecipients: + ethan.furman, tim.peters, barry, theller, rhettinger, pitrou, vstinner, eric.smith, eric.araujo, mrabarnett, Arfrever, r.david.murray, eli.bendersky, sbt, serhiy.storchaka
2013-09-12 14:08:37ethan.furmansetmessageid: <1378994917.07.0.563977426606.issue18986@psf.upfronthosting.co.za>
2013-09-12 14:08:37ethan.furmanlinkissue18986 messages
2013-09-12 14:08:36ethan.furmancreate