Re: [IronPython] System.RuntimeType

2005-05-13 Thread Chris Anderson
How would I do it without an instance available... I basically just want the runtime type for a specific type, not based on an instance. On 5/13/05, John Gossman <[EMAIL PROTECTED]> wrote: element.GetType().GetProperties()   element.GetType().Assembly  _

[IronPython] System.RuntimeType

2005-05-13 Thread Chris Anderson
I'm trying to get a System.RuntimeType in a simple Python script... today if i use the "type" keyword, i get a Python type object... I really want the equivalent of C#'s typeof operator. Specifically I want to be able to access the GetProperties(), GetMethods(), and GetEvents() on the type object..

[IronPython] IronPython.Objects.List doesn't support GetHashCode()

2005-05-12 Thread Chris Anderson (WINDOWS)
Title: IronPython.Objects.List doesn't support GetHashCode() Is there any special reason why this is the case? The code currently reads:     public override int GetHashCode() {     throw Ops.TypeError("list object is unhashable");     } So it’s obviously intentional… howev

Re: [IronPython] IronPython.Objects.List doesn't support GetHashCode()

2005-05-12 Thread Chris Anderson
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:   _list.ItemsSource = range(5)   This means that every list/dictionary/touple needs to support ICustomTypeDescriptor and GetHashCode/SyncRoot... The ICD r

Re: [IronPython] IronPython.Objects.List doesn't support GetHashCode()

2005-05-12 Thread Chris Anderson
ncy in a reasonably performant fashion)... without hash support, i can never bind to lists or dictionaries from python. On 5/12/05, Timothy Fitz <[EMAIL PROTECTED]> wrote:> On 5/12/05, Chris Anderson <[EMAIL PROTECTED]> wrote: > Yes, there is harm in it. Try this in python hash([]) a

[IronPython] IronPython.Objects.List doesn't support GetHashCode()

2005-05-11 Thread Chris Anderson
Is there any special reason why this is the case? The code currently reads: public override int GetHashCode() { throw Ops.TypeError("list object is unhashable"); } So it's obviously intentional… however, I'm trying to use a native Python list as a data source for UI bi