You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why upgrade to 3.10? Mostly quality of life improvements to python. This update would also encompass features introduced in Python 3.9 like generic type hinting, dictionary merging and updating operators and some string prefix and suffix removal functions.
Python 3.10 then introduces some more quality of life like better error messages, pattern matching (a more powerful switch statement) and type aliasing
Overall I think it should bring features that will improve the code base, make it all more readable and enable some new node functionality.
# Generic Type Hinting# <= 3.8my_list: list[str] # errormy_dict: dict[str, int] # errorfromtypingsimportList, Dictmy_dict: Dict[str, int] # okmy_list: List[str] # ok# > 3.8my_list: list[str] # okmy_dict: dict[str, int] # ok# Dictionary Mergingx= {"key1": "value1 from x", "key2": "value2 from x"}
y= {"key2": "value2 from y", "key3": "value3 from y"}
z=x|y# z = {'key1': 'value1 from x', 'key2': 'value2 from y', 'key3': 'value3 from y'}
# Patter matchingclassPoint:
x: inty: intdeflocation(point):
matchpoint:
casePoint(x=0, y=0):
print("Origin is the point's location.")
casePoint(x=0, y=y):
print(f"Y={y} and the point is on the y-axis.")
casePoint(x=x, y=0):
print(f"X={x} and the point is on the x-axis.")
casePoint():
print("The point is located somewhere else on the plane.")
case_:
print("Not a point")
# Type AliasingStrCache='Cache[str]'# a type alias# Better error messagesdeffoo():
iflel:
x=2File"<stdin>", line3x=2^IndentationError: expectedanindentedblockafter'if'statementinline2
The text was updated successfully, but these errors were encountered:
Forgot to mention that the limiting factor to upgrading is that some required dependencies (llvmlite) hasn't been updated yet and are incompatible with 3.10
Why upgrade to 3.10? Mostly quality of life improvements to python. This update would also encompass features introduced in Python 3.9 like generic type hinting, dictionary merging and updating operators and some string prefix and suffix removal functions.
Python 3.10 then introduces some more quality of life like better error messages, pattern matching (a more powerful switch statement) and type aliasing
Overall I think it should bring features that will improve the code base, make it all more readable and enable some new node functionality.
The text was updated successfully, but these errors were encountered: