<div><font face="trebuchet ms"><font face="verdana"><font size="1"><font color="#3333ff">The problem with this model is that it requires you to subclass and use a special type. My goal is to enable simple usage in binding scenarios:
</font></font></font></font></div>
<div><font face="trebuchet ms"><font face="verdana"><font size="1"><font color="#3333ff"></font></font></font></font>&nbsp;</div>
<div><font face="trebuchet ms"><font face="verdana"><font size="1"><font color="#3333ff">_list.ItemsSource = range(5)</font></font></font></font></div>
<div><font face="trebuchet ms"><font face="verdana"><font size="1"><font color="#3333ff"></font></font></font></font>&nbsp;</div>
<div><font face="trebuchet ms"><font face="verdana"><font size="1"><font color="#3333ff">This means that every list/dictionary/touple needs to support ICustomTypeDescriptor and GetHashCode/SyncRoot... The ICD requirement for object/dict is pretty solid, but I'll follow up with our databinding team to see if we can gracefully support non-hash supporting objects... 
</font></font></font></font></div>
<div><font face="trebuchet ms"><font face="verdana"><font size="1"><font color="#3333ff"></font></font></font></font>&nbsp;</div>
<div><font face="trebuchet ms"><font face="verdana"><font size="1"><font color="#3333ff">I'm unclear as to why returning the default CLR implementation of GetHashCode would be bad? It's unique to the life of the object and never changes... it won't be based on the containing data in the list, but it also shouldn't break any hashtable... no?
</font></font></font></font></div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 5/12/05, <b class="gmail_sendername">Timothy Fitz</b> &lt;<a href="mailto:firemoth@gmail.com">firemoth@gmail.com</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Not directly, but subclassing list and dict would work.<br><br>class HashableList:<br>def __hash__(self):<br>
&nbsp;&nbsp; return id(self)<br><br>or<br><br>clash HashableList:<br>def __hash__(self):<br>&nbsp;&nbsp; return 1<br><br>To adapt simply:<br><br>HashableList(MyExistingList)<br><br>Disclaimer, I'm not sure if this works in IronPython today.<br>
</blockquote></div><br>