on a C# page, this directive would make the members of namespace Foo available:
<%@ Import Namespace="Foo" %>
To achieve the same on an IronPython page, I need to write:
from Foo import *
So the namespace directive is superfluent there. Is this by design or something that will get fixed? I like declaring often-used namespaces with directives...
There is a list of default namespaces already imported by Visual Studio in ASP.NET. You only need to import others when they are required.
Hi mobRDF,
you're right, but my point was that if I need to import a namespace not in the default namespace, then I can use the Import directive in both C# and VB.NET, but not in IronPython. The Page, Import and other directives are designed to be language-neutral,
but the IronPython implementation ignores the Import. I wondered if that would be fixed or not in a future release, or if it is by design.
xanadu
Member
10 Points
6 Posts
Import directive not recognized in IronPython?
Jan 10, 2008 08:21 AM|LINK
Hi,
on a C# page, this directive would make the members of namespace Foo available:
<%@ Import Namespace="Foo" %>
To achieve the same on an IronPython page, I need to write:
from Foo import *
So the namespace directive is superfluent there. Is this by design or something that will get fixed? I like declaring often-used namespaces with directives...
Best regards,
xanadu
ASP.NET Futures DLR IronPython
mobRDF
Member
46 Points
8 Posts
Re: Import directive not recognized in IronPython?
Jan 11, 2008 05:23 AM|LINK
Hi xanadu,
There is a list of default namespaces already imported by Visual Studio in ASP.NET. You only need to import others when they are required.
xanadu
Member
10 Points
6 Posts
Re: Import directive not recognized in IronPython?
Jan 12, 2008 04:25 PM|LINK
Hi mobRDF,
you're right, but my point was that if I need to import a namespace not in the default namespace, then I can use the Import directive in both C# and VB.NET, but not in IronPython. The Page, Import and other directives are designed to be language-neutral, but the IronPython implementation ignores the Import. I wondered if that would be fixed or not in a future release, or if it is by design.
Best regards,
xanadu