New features planned for Python 4.0

New features planned for Python 4.0

New features planned for Python 4.0. All new libraries and standard lib modules must include the phrase "for humans" somewhere in their title.

New features planned for Python 4.0. All new libraries and standard lib modules must include the phrase "for humans" somewhere in their title.

With the release of Python 3.8 coming soon, the core development team has asked me to summarize our latest discussions on the new features planned for Python 4.0, codename "ouroboros: the snake will eat itself". This will be an exciting release and a significant milestone, many thanks to the hard work of over 100 contributors.

  • After heated debate on the mailing list, the 79-character line limit prescribed by PEP8 will be updated. IDE users all over the world will now be able to take advantage of their 30" ultra-wide 4K monitors, as the recommended line length will be increased to 89.5 characters (this was a compromise with the 100-character lobby, the decision being to split the difference).
  • All new libraries and standard lib modules must include the phrase "for humans" somewhere in their title.
  • Finally, a new string-type for the masses, Python 4.0 will feature "z-strings": C-style NULL terminated bytestrings. Just prefix your string like so, z'my string' and Python will automatically ensure it is NULL-terminated. Note: the new z-strings cannot be used with any of the existing APIs that take string arguments - they must first be decoded to unicode strings or cast to bytes.
  • Type-hinting has been extended to provide even fewer tangible benefits. This new and "nerfed" type hinting will be called type whispering.
  • Fuck it we're going to just vendor libuv to provide the event loop for Twisted asyncio.
  • You can now use the async keyword before every single other keyword in the Python language, and we encourage you to async do so. There's nothing wrong with cargo-culting some magic keywords all over the place -- you want to go fast, don't you?
  • In addition to namedtuple and dataclasses (3.7), Python 4.0 will include several new thousand line decorator-hacks to implement simple struct types.
  • The GIL has been removed.
  • Just kidding! Instead we've been focusing all our effort on making it easier to juggle multiple interpreter data-structures within a single thread. No, no, you can thank us later!
  • The bytes-vs-str thing kept many of us employed as we had convinced our companies they needed to upgrade to Python 3. In the same spirit, we are excited to announce that there will now be two int types -- int will be a 32-bit signed integer, and long will be a 64-bit signed integer. But before you say, "hey, they did that in Python 2!", we'd like to add that you can no longer use int anywhere, and will need to convert them all to long.
  • Based on the overwhelming success of the 2to3 utility, we plan to release a 3to4 tool that will automatically convert your code to utilize these exciting new features.

With much sadness, the following features did not make the cut:

  • After attempting to rewrite portions of the interpreter with Rust, nobody could figure out how to disable the borrow-checker, so we gave up.
  • No switch statement (and yes, yes, I know you can use a dict to do dispatching).
  • concurrent.Pasts and concurrent.Present will not be merged in time for this release, but hey, we've got futures, haven't we?
  • Since nobody understands how twisted asyncio works, we are unable to offer any improvements at this time. The PSF now recommends all new projects to use gevent.
  • Unfortunately we will not be able to offer any improvements to the packaging "situation".

We look forward to this release, and will do everything in our power to ensure it takes us several minor versions before it is even remotely usable.

Take heart! Remember the python motto:

What is dead can never die

Don't worry, all these snakes were already on death row.

python django

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Python Django Tutorial | Django Course

🔥Intellipaat Django course: https://intellipaat.com/python-django-training/ 👉This Python Django tutorial will help you learn what is django web development &...

Basic Data Types in Python | Python Web Development For Beginners

In the programming world, Data types play an important role. Each Variable is stored in different data types and responsible for various functions. Python had two different objects, and They are mutable and immutable objects.

Main Pros and Cons of Django As A Web Framework for Python Developers

India's best Institute for Django Online Training Course & Certification. Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

How To Compare Tesla and Ford Company By Using Magic Methods in Python

Magic Methods are the special methods which gives us the ability to access built in syntactical features such as ‘<’, ‘>’, ‘==’, ‘+’ etc.. You must have worked with such methods without knowing them to be as magic methods. Magic methods can be identified with their names which start with __ and ends with __ like __init__, __call__, __str__ etc. These methods are also called Dunder Methods, because of their name starting and ending with Double Underscore (Dunder).

How to Cache Website using Django — Python ?

How to Cache Website using Django — Python ?. In this blog we would discuss caching an entire website(And thus consider it as part 1 of Caching Series).