You have a typo in your first sample, don't you?  (See below.)

To my way of thinking, by the way, "for Types in Types" does not follow the admonishment to use a separate variable name for each concept / idea.  "for Type in Types" certainly makes more sense.  "for Type in a.GetTypes()" makes sense.



At 01:23 PM 6/1/2006, Lesley & Mitch Barnett wrote
Here is the code in the interpreter to show Types in Types: does work or is it a bug?
 
IronPython 1.0.2328 (Beta) on .NET 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
>>> from System.Reflection import *
>>> a = Assembly.LoadFrom("mapack.dll")
>>> Types = a.GetTypes()
>>> for Type in Types:

Next line needs to be "print Type" doesn't it?  You're just printing the value of Types, which doesn't change, once for each value in Types.

...   print Types
...
System.Type[]
System.Type[]
System.Type[]
System.Type[]
System.Type[]
System.Type[]
 
 
>>> Types = a.GetTypes()
>>> for Types in Types:
...   print Types
...
Mapack.CholeskyDecomposition
Mapack.EigenvalueDecomposition
Mapack.LuDecomposition
Mapack.Matrix
Mapack.QrDecomposition
Mapack.SingularValueDecomposition
>>>
 
[snip]


J. Merrill / Analytical Software Corp
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to