dinov at microsoft.com
Tue Jan 6 09:44:45 PST 2009
Strangely I don't see one - this is frequently asked for so I'm a little surprised :)
I have a plan on how to enable this (and some other .NET scenarios) in the next major release. My current thinking is to support this via meta-classes and providing a new method on type which lets you specify the underlying .NET type used for the Python type. That will enable this feature to be implemented in Python along with other .NET interop features like:
having a Python type which has a default constructor which is available to .NET (important for frameworks which use reflection to create instances).
Having concrete .NET members which expose Python members (important for frameworks which use reflection for member access - e.g. data binding).
People can then debate and throw around code for what the best syntax for .NET custom attributes is from Python and implement it themselves. If anyone has feedback on this I'd love to hear it.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Cenovsky, Lukas
Sent: Tuesday, January 06, 2009 9:13 AM
To: Discussion of IronPython
> Unfortunately we can't apply attributes to Python classes. I
> get round
> this particular problem by creating stub classes in C# and inheriting
> from them in Python. See:
Is there a CodePlex issue to resolve this?
Users mailing list
Users at lists.ironpython.com
More information about the Users