[April Fools 2021] Python 4.0! New old print, mandatory static typing, StackOverflow integration

mCoding · Intermediate ·🔍 RAG & Vector Search ·5y ago
Skills: RAG Basics60%

Key Takeaways

Python 4.0 features new old print syntax, mandatory static typing, and StackOverflow integration as announced in PEP401, although this is an April Fools' joke.

Full Transcript

hello everyone i'm james murphy and as you can see i am on python.org with some huge news python 4.0 has just been released let's take a look pep401 outlined some of the major changes coming in python 4 and here are the big ones we have new old print syntax mandatory static typing and stack overflow integration i've already taken a quick look at these but i'm just going to go through sort of the abstract reasoning and sort of give you my impressions as we read through it so let's just read through it together okay so it's going to tell us about the new features coming in python 4. the 4.0 series is reserved for groundbreaking changes in the python language and this is nothing less than that okay good ever since the original breaking changes made in the 2-7-3-0 transition the community has been primarily split down version lines agree surveys have found the average python programmer spends over fifty percent of their work time converting two to three with over ninety percent of that time um putting parentheses around print statement arguments definitely in python four the old print syntax is going to be reintroduced so that you don't have to change that old code anymore it will just start working again that's awesome and of course the newer print function is going to still be supported next we have a fundamental change to the type system uh python was initially developed as a dynamic type system but it was too flexible to allow offline optimizations by optimizing the pilers in python 4 type annotations will become mandatory on all function arguments return types and variables that cannot be statically deduced the standard library will be typed completely with the exception of the explicit duct type and so most code depending solely on standard library functions and types will not need much change this is a huge change it's completely overhauling the type system type annotations are now mandatory but what do we get for this an average speed increase of over thirty 000 percent and memory usage decrease of 50 percent across the entire standard library again huge change huge benefit finally python has long been known for how easy it is to develop and yada yada yada we're partnering with stack overflow to bring automated stack overflow report yields uh in short any time an unhandled exception reaches the interpreter the source code accessible state of the stack and heap all variables and values in scope will automatically be uploaded and published to stack overflow along with the relevant stack trace as a question to a dedicated python overflow section of the site for other users to debug that means when you have an error you don't even have to post it on stack overflow anymore it's already covered and like i said before this was just accepted last night apparently it was a unanimous vote by the python language committee and it's coming soon to a python near you this just all happens so fast i mean there are so many new features coming huge changes coming um i'm not even sure exactly what to say i mean it all sounds really really good so i just wanted to give you my take uh my first impression on these changes it's probably going to be like a year before you know the release actually happens um but i'm always looking ahead always looking forward to that next release so let me know what you think of these changes down in the comments don't forget to like comment and subscribe i'll see you next april fools yes obviously this is an april fool's joke there is no python 4 yet and none of these things are ever going to be implemented in python

Original Description

Some big changes are coming to Python! Obviously this is an APRIL FOOLS JOKE (2021). (For those unfamiliar with US traditions, once a year on April 1st, it is traditional to spread ridiculous or outrageous obviously false statements in the name of good fun.) This video is entirely satirical and None of the changes claimed have actually been stated by any official Python representative in any way. The website is not real, I just right-click inspected an existing PEP and changed it locally on my machine. ― mCoding with James Murphy (https://mcoding.io) SUPPORT ME ⭐ --------------------------------------------------- Patreon: https://patreon.com/mCoding Paypal: https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Other donations: https://mcoding.io/donate BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.com/r/mCoding/ Facebook: https://www.facebook.com/james.mcoding
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from mCoding · mCoding · 17 of 60

1 Goodbye, List! Type hinting standard collections - New in Python 3.9
Goodbye, List! Type hinting standard collections - New in Python 3.9
mCoding
2 Python's comma equals ,= operator?
Python's comma equals ,= operator?
mCoding
3 Finding Primes in Python with the Sieve of Eratosthenes
Finding Primes in Python with the Sieve of Eratosthenes
mCoding
4 Find the First Missing Positive Int | Hard Interview Question on LeetCode
Find the First Missing Positive Int | Hard Interview Question on LeetCode
mCoding
5 JSON Tutorial Python | Basic Python Recipes
JSON Tutorial Python | Basic Python Recipes
mCoding
6 Simulating Brownian Motion in Python
Simulating Brownian Motion in Python
mCoding
7 The Single Most Useful Decorator in Python
The Single Most Useful Decorator in Python
mCoding
8 The Fastest Way to Loop in Python - An Unfortunate Truth
The Fastest Way to Loop in Python - An Unfortunate Truth
mCoding
9 Numpy Array Broadcasting In Python Explained
Numpy Array Broadcasting In Python Explained
mCoding
10 Brownian Motion Single Path Zoom
Brownian Motion Single Path Zoom
mCoding
11 Brownian Motion Fractal Zoom
Brownian Motion Fractal Zoom
mCoding
12 Magic Methods - Making Python builtins work with your classes
Magic Methods - Making Python builtins work with your classes
mCoding
13 50 Million Primes In 5 Seconds - Segmented Sieve of Eratosthenes
50 Million Primes In 5 Seconds - Segmented Sieve of Eratosthenes
mCoding
14 The Hottest New Feature Coming In Python 3.10 - Structural Pattern Matching / Match Statement
The Hottest New Feature Coming In Python 3.10 - Structural Pattern Matching / Match Statement
mCoding
15 How Fast is Python's Sort? Performance Testing
How Fast is Python's Sort? Performance Testing
mCoding
16 C++ First Missing Int, faster than 100%!
C++ First Missing Int, faster than 100%!
mCoding
[April Fools 2021] Python 4.0! New old print, mandatory static typing, StackOverflow integration
[April Fools 2021] Python 4.0! New old print, mandatory static typing, StackOverflow integration
mCoding
18 Python dataclasses will save you HOURS, also featuring attrs
Python dataclasses will save you HOURS, also featuring attrs
mCoding
19 C++ Sudoku Solver in 7 minutes using Recursive Backtracking
C++ Sudoku Solver in 7 minutes using Recursive Backtracking
mCoding
20 Every PROOF you've seen that .999... = 1 is WRONG
Every PROOF you've seen that .999... = 1 is WRONG
mCoding
21 Python's sharpest corner is ... plus equals? (+=)
Python's sharpest corner is ... plus equals? (+=)
mCoding
22 Binary Search - A Different Perspective | Python Algorithms
Binary Search - A Different Perspective | Python Algorithms
mCoding
23 The Best Way to Check for Optional Arguments in Python
The Best Way to Check for Optional Arguments in Python
mCoding
24 Local and Global Variable Lookup Weirdness in Python
Local and Global Variable Lookup Weirdness in Python
mCoding
25 Efficient Exponentiation
Efficient Exponentiation
mCoding
26 How To Install Python for Data Science
How To Install Python for Data Science
mCoding
27 0.1 + 0.2 is NOT 0.3 in Most Programming Languages
0.1 + 0.2 is NOT 0.3 in Most Programming Languages
mCoding
28 Python 3.10's new type hinting features
Python 3.10's new type hinting features
mCoding
29 Python 3.10's Quality of Life improvements
Python 3.10's Quality of Life improvements
mCoding
30 Introducing mZips! Python Zip and Zip Longest
Introducing mZips! Python Zip and Zip Longest
mCoding
31 Match statement tips
Match statement tips
mCoding
32 Using except: is a HUGE mistake
Using except: is a HUGE mistake
mCoding
33 Python + YouTube API | Automating descriptions
Python + YouTube API | Automating descriptions
mCoding
34 Anaphones, phonetic anagrams
Anaphones, phonetic anagrams
mCoding
35 Cracking passwords using ONLY response times | Secure Python
Cracking passwords using ONLY response times | Secure Python
mCoding
36 Python f-strings can do more than you thought. f'{val=}', f'{val!r}', f'{dt:%Y-%m-%d}'
Python f-strings can do more than you thought. f'{val=}', f'{val!r}', f'{dt:%Y-%m-%d}'
mCoding
37 Diagnose slow Python code. (Feat. async/await)
Diagnose slow Python code. (Feat. async/await)
mCoding
38 Python MD5 implementation
Python MD5 implementation
mCoding
39 Salting, peppering, and hashing passwords
Salting, peppering, and hashing passwords
mCoding
40 x to bool conversion in Python, C++, and C
x to bool conversion in Python, C++, and C
mCoding
41 You should put this in all your Python scripts | if __name__ == '__main__': ...
You should put this in all your Python scripts | if __name__ == '__main__': ...
mCoding
42 Find the Skyline Problem with C++ Solution Explained
Find the Skyline Problem with C++ Solution Explained
mCoding
43 The ONLY C keyword with no C++ equivalent
The ONLY C keyword with no C++ equivalent
mCoding
44 Should you use "not not x" instead of "bool(x)" in Python? (NO!)
Should you use "not not x" instead of "bool(x)" in Python? (NO!)
mCoding
45 Multiple Assignments in Python
Multiple Assignments in Python
mCoding
46 Why I don't like Python's chained comparisons
Why I don't like Python's chained comparisons
mCoding
47 Automated Testing in Python with pytest, tox, and GitHub Actions
Automated Testing in Python with pytest, tox, and GitHub Actions
mCoding
48 You can pip install directly from GitHub
You can pip install directly from GitHub
mCoding
49 __new__ vs __init__ in Python
__new__ vs __init__ in Python
mCoding
50 Metaclasses in Python
Metaclasses in Python
mCoding
51 The easy way to keep your repos tidy.
The easy way to keep your repos tidy.
mCoding
52 Which Python @dataclass is best? Feat. Pydantic, NamedTuple, attrs...
Which Python @dataclass is best? Feat. Pydantic, NamedTuple, attrs...
mCoding
53 Python __slots__ and object layout explained
Python __slots__ and object layout explained
mCoding
54 C++ cache locality and branch predictability
C++ cache locality and branch predictability
mCoding
55 Avoiding import loops in Python
Avoiding import loops in Python
mCoding
56 25 nooby Python habits you need to ditch
25 nooby Python habits you need to ditch
mCoding
57 Python staticmethod and classmethod
Python staticmethod and classmethod
mCoding
58 Building a Python app with Anvil to email me if my website goes down (includes paid features)
Building a Python app with Anvil to email me if my website goes down (includes paid features)
mCoding
59 31 nooby C++ habits you need to ditch
31 nooby C++ habits you need to ditch
mCoding
60 Interviewing the creator of C++, Bjarne Stroustrup
Interviewing the creator of C++, Bjarne Stroustrup
mCoding

This video announces fictional features of Python 4.0, including a new old print syntax, mandatory static typing, and StackOverflow integration, as an April Fools' joke. The video is satirical and not meant to be taken seriously. The features announced are not real and are not going to be implemented in Python.

Key Takeaways
  1. Watch the video to understand the fictional features of Python 4.0
  2. Read PEP401 to learn more about the fictional changes
  3. Understand the differences between dynamic and static type systems
  4. Learn about the importance of type annotations in programming
💡 The video is an April Fools' joke and the features announced are not real.

Related AI Lessons

Your AI Keeps Making Things Up. RAG Is How You Make It Use Real Facts Instead.
Learn how to use RAG to make your AI provide accurate answers based on real facts instead of making things up
Medium · RAG
Evaluation Metrics for RAG: Measure Retrieval, Generation, and End-to-End Quality With Numbers That…
Learn to evaluate RAG models using metrics that measure retrieval, generation, and end-to-end quality
Medium · AI
Evaluation Metrics for RAG: Measure Retrieval, Generation, and End-to-End Quality With Numbers That…
Learn to evaluate RAG models using metrics that measure retrieval, generation, and end-to-end quality
Medium · Data Science
When Does HyDE Help RAG? I Tested 3 Query Types and It Failed on Two
Learn when HyDE retrieval helps or hinders RAG performance across different query types, and why it matters for improving search accuracy
Medium · AI
Up next
RRF vs DBSF with Qdrant: Hybrid Retrieval Fusion for RAG in Python
Professor Py: AI Engineering
Watch →