Difference between IronPython2 and Python3 in Rhino 8

In Rhino 8 Grasshopper has new python components, IronPthon 2 and Python 3.
Could anyone tell me the difference between these 2 components ??

by searching internet, what I understand so far is,

IronPython is written with C# and targeting .Net Platform. and CPtyhon is written with C and Basic plathome (and you can use pip??)
I understand as the difference between IronPython and CPython.

The difference between Python 2.7 and 3.4 are

  1. for print function, python 2.7 writes print “” and python 3.4 writes print()
  2. long value in python 2.7 became int in python 3.7
  3. Python 3.7 changes how to write exceptions.

These are what I know so far…

But in grasshopper rhino 8, there is IronPython 2.7 and CPython 3.4.
I want to know more about the difference between IronPthon 2 and Python 3 or even benefits to use CPython 3.4…

Thank you so much for your help !!

you can use pip??
short answer,yes.

The main differences are the lack of support in Python 2 for the shiny new features that weren’t backported: f-strings, type annotations etc. The definitive information is in the changelogs:

A lot of those (like dict comprehensions) got back ported to some version of Python 2 that back then was still supported.

There’s an important difference between “old style classes” and “new style classes”. New style became the norm in Python 3. To get new style in Python 2, a base class needs to inherit from object. If you encounter the difference, perhaps you should favour composition over inheritance anyway.

The differences between Iron Python 2.7 and CPython 2.7 -should- be mainly extensions (IronPython has access to the .Net System and clr libraries). And implementation details. Should. IronPython strings (System.Strings) support unicode quite well, without needing to worry about CPython 2.7’s unicode and u-strings. It behaves more like Python 3 regarding bytes and str.

https://ironpython.net/documentation/dotnet/

2 Likes

Thank you so much for the detailed explanation!