<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 14, 2013, at 8:09 AM, Serhiy Storchaka <<a href="mailto:storchaka@gmail.com">storchaka@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Arial; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">I propose to add two methods:</span><br style="font-family: Arial; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br style="font-family: Arial; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="font-family: Arial; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">dict.getkey(key) returns original key stored in the dict which is equal to specified key. E.g.</span><br style="font-family: Arial; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></blockquote><br></div><div>For what is worth:</div><div><br></div><div>* this idea was proposed and rejected at least once before</div><div><br></div><div>* the one obvious way to do it is an interning dictionary</div><div>  that maps values back to themselves</div><div><br></div><div>* the use cases for this are somewhat uncommon</div><div>  (i.e. most people don't need it most of the time)</div><div><br></div><div>* if you think you really need this functionality, </div><div>  it is possible to write a function that works with all</div><div>  containers as they are already implemented</div><div>  (i.e. you could you it today):</div><div>  <a href="http://code.activestate.com/recipes/499299-get_equivalentcontainer-item">http://code.activestate.com/recipes/499299-get_equivalentcontainer-item</a></div><div><br></div><div>* all the participants on this list would be well served to teach</div><div>   some python classes to get an appreciation of the negative</div><div>   consequences of further expanding the APIs of the core containers.</div><div>   Bigger is not better.  Learnability matters.  </div><div><br></div><div><br></div><div>Raymond</div><br></body></html>