"A while ago Amit Regmi, a student from Canada, started working on the clr module improvements branch as a university project. During the sprint Carl Friedrich, Paul and me worked more on it and brought it to a mergeable state. It adds a lot of new features to the clr module, which is the module that allows integration between pypy-cli (aka PyPy.NET) and the surrounding .NET environment:"
"full support to generic classes; a new importer hook, allowing things like and so on; .NET classes that implements IEnumerator are treated as Python iterators; e.g. it's is possile to iterate over them with a loop. This is an example of a pypy-cli session: >>>> from System import Math >>>> Math.Abs(-42) 42 >>>> from System.Collections.Generic import List >>>> mylist = List[int]() >>>> mylist.Add(42) >>>> mylist.Add(43) >>>> mylist.Add("foo") Traceback (most recent call last): File "<console>" line 1, in <interactive> TypeError: No overloads for Add could match >>>> mylist[0] 42 >>>> for item in mylist: print item 42 43"
Amit Regmi, a student from Canada, started work on the clr module improvements branch as a university project. During a sprint Carl Friedrich, Paul and another contributor advanced the branch to a mergeable state. The clr module now provides full support for generic classes, a new importer hook, and treats .NET classes implementing IEnumerator as Python iterators. An interactive session demonstrates System.Math.Abs, creation and type-checked System.Collections.Generic.List[int], and iteration behavior, including a TypeError when adding a wrong type. The branch remains an alpha release with known and likely unknown bugs but marks a significant step toward real-world .NET integration.
Read at Antocuni
Unable to calculate read time
Collection
[
|
...
]