Python has pre-released a new version 3.10 (3.10.0a7) on April 10, 2021 which is still in development, the last stable release was Python 3.09 released on May 20, 2020.
Whats new features in Python 3.10
- Parenthesized context managers
- Better error messages in the parser
- PEP 626: Precise line numbers for debugging and other tools
- PEP 634: Structural Pattern Matching
- PEP 563: Postponed Evaluation of Annotations Becomes Default
- PEP 604: New Type Union Operator
- PEP 612: Parameter Specification Variables
- PEP 613: TypeAlias Annotation
Some Other Changes:
- int type now has a new method int.bit_count() - this method returns the number of ones in the binary expansion of a given integer.
- dict.keys(), dict.values() and dict.items() returns a view that has a mapping attribute that gives a types.MappingProxyType object wrapping the original dictionary.
- PEP 618: The zip() function now has an optional strict flag, used to require that all the iterables have an equal length.
- Builtin and extension functions that take integer arguments no longer accept Decimals, Fractions and other objects that can be converted to integers only with a loss
- Static methods (@staticmethod) and class methods (@classmethod) now inherit the method attributes (__module__, __name__, __qualname__, __doc__, __annotations__) and have a new __wrapped__ attribute.
- Two new builtin functions – aiter() and anext() have been added to provide asynchronous counterparts to iter() and next()
- Assignment expressions can now be used unparenthesized within set literals and set comprehensions, as well as in sequence indexes (but not slices).
Source: See more - https://docs.python.org/3.10/whatsnew/3.10.html
Comments:
-
Read more: https://blog.python.org
ddve 11 Apr 2121 07:05:56 GMT
- Further comments disabled!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!