[IronPython] New language features to support VS

Dino Viehland dinov at exchange.microsoft.com
Tue Nov 6 20:09:11 CET 2007


It's actually a feature of the IronPython CodeDom provider - it enables the CodeDom provider to successfully round trip the generated code.  But it's not actually recognized by the normal Python compiler.  You'll find all of the code for this in the CodeDom subfolder of the IronPython source tree.

For ASP.NET support in v1.0 we did play around with experimental support for static compilation and these comments will get recognized in that mode - unfortunately there's a bunch of bugs in static compilation and we've ripped that support in v2.0.  So I would encourage not using static compilation :).

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of David.Lawler at franke.com
Sent: Tuesday, November 06, 2007 11:04 AM
To: Discussion of IronPython
Subject: [IronPython] New language features to support VS

I noticed some unusual things in the python source recently while playing
with/learning about the IronPython integration in VS 2008 Beta 2:

"""type(_button1) == System.Windows.Forms.Button, type(_label1) ==
System.Windows.Forms.Label"""
__slots__ = ['_button1', '_label1']
@returns
@accepts

I understand what the __slots__ line and what the @returns & @accepts
decorators are about.  The type 'definition' in the docstring has me
thrown for a loss.  Is that a feature in IronPython (what the heck would
it be called) - or is it used only by VS for the forms designer?  I am
thinking it is actually a IronPython feature because it seems to make the
new alpha release of the Sharpdevelop IP binding designer a lot happier as
well as VS.  Is there somewhere (anywhere) where features like this are
documented (yes I looked at the ironpython-differences doc).  I also
looked through the source for IP (found the @returns and @accepts stuff),
and the source for the VS integration sample but could not decipher where
type definitions could be inside docstings/triple quoted strings.

Thanks,

David Lawler

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



More information about the Ironpython-users mailing list