Python inner working
Summary
TLDRThe video script is from a Python tutorial series on the 'Tea and Code' channel, focusing on the installation of Python and pip, and the execution of a 'Hello World' program. The host encourages viewers to engage by aiming for 300 comments within 24 hours of the video upload. The script delves into the technical aspects of Python, discussing its nature as an interpreted and compiled language, and the process of converting source code to bytecode. It also touches on optimization techniques, the role of the Python virtual machine, and the importance of understanding Python's inner workings for developers, especially those aspiring to work in high-end companies or open-source projects.
Takeaways
- 😀 The video is part of a series on the 'Tea and Code' channel, focusing on Python programming.
- 🔧 The target for the video is to reach 300 comments within 24 hours of the video upload, emphasizing audience engagement.
- 🎯 The script discusses the importance of understanding what happens behind the scenes in Python, moving beyond just writing code.
- 💻 It highlights the difference between Python being an interpreted and a compiled language, and the role of byte code in Python's execution.
- 🛠️ The video explains the process of Python code compilation into byte code and the subsequent execution by the Python virtual machine.
- 📝 The script mentions the use of '.pyc' files, which are compiled Python code, and their role in making Python scripts run faster.
- 🔎 It delves into the organization of Python's internal structure, including the use of '__init__.py' files and the significance of the '__main__' directory.
- 🌐 The video touches on the concept of PythonAnywhere, an online platform for running Python scripts, and its role in executing Python code.
- 📈 The script discusses the importance of understanding Python's inner workings for developers, especially those aiming to work in high-end companies or open-source projects.
- 📝 The video concludes with an assignment for the viewers to write an article on the inner workings of Python after doing some research, encouraging deeper learning and contribution to the developer community.
Q & A
What is the main target of the video?
-The main target of the video is to achieve 300 comments within 24 hours of the video upload.
What is the purpose of discussing Python and its inner workings in the video?
-The purpose is to demystify what happens behind the scenes when Python code is executed and to generate interest by discussing the engineering aspects of Python.
What is the difference between Python being an interpreted language and a compiled language as discussed in the video?
-The video clarifies the misconception that Python is either strictly an interpreted or a compiled language. It explains that Python compiles source code into an intermediate bytecode, which is then executed by the Python Virtual Machine.
Why is it important to understand the difference between bytecode and machine code in the context of Python?
-Understanding the difference is important because bytecode is an intermediate representation that is platform-independent, while machine code is specific to the hardware and is what the computer's processor directly executes.
What is the role of the Python Virtual Machine (PVM) in executing Python code?
-The PVM continuously loops, executing any code fed into it. It takes the bytecode produced by the compilation of Python source code and runs it, handling the execution of the program.
What does the video suggest about the optimization of Python code?
-The video suggests that optimization is necessary when dealing with imported files and modules, as the Python interpreter needs to manage and compile the bytecode efficiently.
Why is it recommended to install and explore things when working with Python, as mentioned in the video?
-It is recommended to install and explore to understand the hidden folders and processes that occur when Python code is executed, which are often abstracted away from the user.
What is the significance of the '.pyc' files discussed in the video?
-The '.pyc' files are bytecode files that are generated from Python source code. They are used to speed up the execution of Python scripts by skipping the syntax checking and parsing that occurs with source code.
How does the video address the importance of understanding Python's inner workings for job interviews?
-The video emphasizes that high-end companies and open-source projects often ask for in-depth knowledge of Python's inner workings, not just basic scripting or print statements.
What are some of the different implementations of Python mentioned in the video?
-The video mentions CPython (the standard implementation), Jython, IronPython, PyPy, and Stackless Python as some of the different implementations.
What is the assignment proposed at the end of the video for viewers who understood the inner workings presented?
-The assignment is for viewers to do some research, understand the material better, and write a good article about it, potentially on a developer-focused website like Hashnode.
Outlines
😀 Introduction to Python and Tea with Code
The speaker warmly welcomes the audience to the 'Tea and Code' channel and introduces the series 'Tea and Python.' They emphasize the need to have Python-pip installed to print a 'Hello World' program. The speaker sets a small goal for the video, aiming for 300 comments within 24 hours of the video upload. They express their hope that the audience will find the behind-the-scenes workings of Python interesting and promises an entertaining video. The speaker then shares their surprise at the lack of discussion on the engineering aspects of Python and aims to spark interest in these areas.
👨💻 Behind the Scenes of Python's Working
The speaker delves into the technical aspects of Python, starting with a simple 'Hello World' example. They discuss the process of writing Python code and the resulting bytecode, which is then executed by the Python interpreter. The speaker clarifies misconceptions about Python being an interpreted or a compiled language, explaining that Python code is compiled into an intermediate bytecode. They emphasize that this bytecode is platform-independent and can be executed on any machine with a Python interpreter. The speaker also touches on the optimization that occurs when bytecode is used, as it has already undergone syntax checks and parsing.
📝 Deeper Understanding of Python's Compilation Process
The speaker continues to explain the compilation process of Python, highlighting that the term 'compiled' in Python refers to the conversion of source code into bytecode, not machine code. They discuss the role of the Python interpreter in executing this bytecode and how it differs from a traditional compiled language. The speaker also mentions the importance of Python's version in the compilation process, emphasizing that the version used can affect the optimization and features available. They provide an example of a simple Python script and how it is compiled into bytecode, which is then executed by the interpreter.
🌐 Variants of Python and Their Applications
The speaker concludes the discussion by exploring different variants of Python, such as CPython, which is the standard implementation, and others like IronPython and PyPy, which are optimized for specific use cases like working with Java or improving performance. They emphasize the importance of understanding the differences between these implementations and how they are used in various environments. The speaker also encourages the audience to share the video and engage with the content, suggesting that such engagement can lead to more in-depth videos on the subject.
Mindmap
Keywords
💡Python
💡pip
💡Hello World
💡Compilation
💡Bytecode
💡Python Virtual Machine (PVM)
💡Interpreter
💡Import Statements
💡Optimization
💡PythonAnywhere
💡Version Control
Highlights
Introduction to the 'Tea and Python2' series on the 'Tea and Code' channel.
Requirement of having Python-pip installed to print 'Hello World'.
Setting a target of 300 comments within 24 hours of the video upload.
Discussion on the surprising aspect of Python understanding and the need for more engineering behind-the-scenes discussions.
Explanation of the process of writing 'Hello World' in Python and the associated file naming conventions.
Diving into the concept of Python being an interpreted language versus a compiled language.
Introduction to the PythonAnywhere platform and its role in executing Python scripts.
Explanation of the compilation process to bytecode in Python.
Discussion on the benefits of bytecode, such as faster execution due to reduced syntax checks and parsing.
Importance of the '__pycache__' folder and its role in storing compiled bytecode.
Explanation of the '__main__' check in Python and its purpose.
Details on the 'source_change' and how Python handles changes in the source code.
Importance of specifying the Python version when creating '__pycache__' files.
Discussion on the optimization of imports and the role of internal compilers.
Introduction to the Python virtual machine (PVM) and its continuous loop for executing fed files.
Comparison of the PVM to a car engine, emphasizing the necessity of a runtime engine for language execution.
Highlighting the importance of understanding bytecode and machine code for high-end interviews in tech companies.
Encouragement for viewers to share the video to promote the creation of more in-depth technical content.
Assignment for viewers to write an article on the discussed Python internals for practice and to be featured on a popular developer blog.
Transcripts
हां जी कैसे हैं आप सभी स्वागत है आप सभी
का चाय और कोड चैनल में और हमारी सीरीज चल
रही है चाय और python2 पे हम
python-pip एटलीस्ट इंस्टॉल होना चाहिए
आपको एक हेलो वर्ल्ड प्रिंट करवा सकूं ठीक
है बस इसके बाद हम आगे चलेंगे इस वीडियो
का जो हमारा टारगेट है वो बहुत ही छोटा सा
टारगेट है सिर्फ 300 कमेंट्स का विद इन 24
आवर्स ऑफ द अपलोड ऑफ दिस वीडियो तो होप
फुली कि आप लोग 24 आवर्स के अंदर ही हमारे
इतने कमेंट्स करवा देंगे तो प्लीज टारगेट
फटाफट अचीव करवा दीजिएगा सब्सक्राइब नहीं
किया है तो कर दीजिएगा और चलते हैं आगे अब
पता है मुझे इस वीडियो की सबसे
सरप्राइजिंग बात क्या लगती है कि देखिए
कि यार सही मायने में तो पाइथन अब समझ में
आ रही है कि एक्चुअली में बिहाइंड द सीन
इनर वर्किंग होता क्या है पाइथन का अभी तक
तो सिर्फ लोग या तो हैंड रिटन नोट्स दे
रहे थे या सिर्फ कोड कर रहे थे तो ऐसा
नहीं होना चाहिए ना कभी तो कोई
इंजीनियरिंग बिहाइंड द सीन की बात करे
ताकि इंटरेस्ट बना रहे तो इस वीडियो को
देख के आपको बहुत मजा आएगा ये प्रॉमिस है
तो चलिए चलते हैं अब मेन जो प्रॉब्लम वाली
बात है ना वो क्या है एक्चुअली में आपके
साथ में पहले स्क्रीन शेयर करते हैं कि जब
हमने हेलो वर्ल्ड पाइथन लिखा था ये हेलो
चाय तब तक तो कोई दिक्कत नहीं थी सिर्फ एक
हेलो चाय ही लिखा था ने चाय विथ
python2 अंडरस्कोर पहले और फिर वो दिखता
एक अंडरस्कोर जैसा है फिर ये पाय कैश है
क्या चीज और इसके अंदर यह फाइल आई कहां से
जो कि है हेलो
c python3 122
pc5 के इसके रन कर सकता हूं क्या पाइथन
इसको वापस से प्रोड्यूस करेगा क्या होगा
जब मैं कोड में कोई चेंज करूंगा तो ये
सारी चीजें हमें एक्चुअली में जाननी थी और
इसी के बारे में हमारा ये पूरा वीडियो है
ताकि हमें
pythonanywhere.com हैं कि मेन मुद्दे की
जो बात है उसको छोड़ देते हैं सर पाइथन तो
इंटरप्रिटेड लैंग्वेज होती है सर पाइथन तो
कंपाइल्ड लैंग्वेज होती है बस इसी बहस में
लगे हुए हैं यह नहीं जानना कि एक्चुअली
में वर्किंग बताओ ना मैं खुद जज कर लूंगा
इंटरप्रिटेड है कि कंपाइल्ड है वर्किंग
बताओ चलिए आपको वर्किंग ही समझाते हैं इस
लैंग्वेज की बड़ी इंटरेस्टिंग वर्किंग है
पहले चलते हैं हम हमारे आईपैड व्यू पे तो
यह है हमारा आईपैड व्यू जिन लोगों को नहीं
पता कि हम कुछ थ्योरी वगैरह डिस्कस करते
टाइम हमारा यही वाइट बोर्ड है यही ब्लैक
बोर्ड है यही डिजिटल बोर्ड है इसी पे हम
काम चलाते हैं तो इस वीडियो के अंदर हम
जानेंगे कि pythonanywhere.com
प्रोग्राम बोलिए इसमें कोई अंतर नहीं है
कुछ लोग स्क्रिप्ट बोलते हैं मैं
प्रोग्राम बोलता हूं या आप प्रोग्राम बोल
लीजिए कोई इसमें खास अंतर नहीं आने वाला
हमने उसको फाइल का नेम दिया . पवा और उसने
जो भी उसके अंदर इंस्ट्रक्शन थे उसको
एग्जीक्यूट करवा दिया चाहे वो प्रिंटिंग
का इंस्ट्रक्शन हो चाहे कोई कैलकुलेशन का
इंस्ट्रक्शन हो या हो सकता है कोई वेब पेज
बनाने का इंस्ट्रक्शन हो जो भी उसने
इंस्ट्रक्शन कंप्लीट कर दिया तो जब वो
इंस्ट्रक्शन कंप्लीट करते हैं तो बिहाइंड
द सीन आपको कुछ दिखता है ये जो मैंने
बनाया है ये एक्चुअली में
बाइट कोड हां जी
पास वो है बाइट कोड बाइट कोड पे भी अभी और
चर्चा करेंगे यह आपका जावा वाला बाइट कोड
वगैरह मत समझ लेना इसको ऑलमोस्ट वैसा ही
है बट नहीं थोड़ा सा अलग भी होता है तो
बाइट कोड अपना बनता है बाइट कोड बनने के
बाद जैसे आपने
python-pip v ए जिसका नाम है
python2 कोड जो है उसके बाद फेच किया जाता
है
पूरा कोड रन होता है इसके बारे में भी और
डिटेल अभी हम चर्चा करेंगे इन्हीं नोट्स
के अंदर बट यही बेसिक काम है तो देखा कुछ
ज्यादा इसमें कुछ खास था ही नहीं ना ही
कोई ऐसे थ्रेड्स है ना लूप्स है ना कुछ इस
तरह से है कि क्यूज लग गई ऐसा कुछ नहीं है
बस सिंपल बाइट कोड बनेगा बाइट कोड बनने के
बाद पाइथन सीधा वर्चुअल मशीन में जाता है
और वहां पे कोड रन होता है तो बड़ा ही
बेसिक सा काम है अब हम चलते हैं हमारा जो
स्टेप वन है वो क्या होता है कंपाइल टू
बाइट कोड अब जैसे मैं लिखूंगा कंपाइल टू
बाइट कोड कुछ लोग सोचेंगे कि अरे यह तो
कंपाइल्ड लैंग्वेज हुई ना बाइट कोड में
हुआ नहीं यह एक्चुअली में एक कहने का
तरीका है यह एक अ टेक जर्गन बोल सकते हो
आप इसको या टेक्नोलॉजिकल टर्म है कि
एक्चुअली में जब आपका पाइथन का कोड
कन्वर्ट होता है बाइट कोड में तो वो
कंपाइल्ड ा डाउन होता है तो उसको एक
इंटरप्रिटेशन टर्म है वो तो इससे ये मत
सोच लेना कि नहीं नहीं पाइथन अब क्योंकि
बाइट कोड बनता ही है तो मैं तो कंपाइल
लैंग्वेज कहूंगा नहीं ऐसा नहीं है वो एक
इंटरमीडिएट स्टेप है आपका जिसमें हम बोलते
हैं कि वो पाइथन का आपका जो सारा सोर्स
कोड है वो कंपाइल डाउन होता है बाइट कोड
में अब बाइट कोड जो है ना वो आपका लो लेवल
कोड है मशीन कोड नहीं है लो लेवल को कोड
है जो कि प्लेटफॉर्म इंडिपेंडेंट है यानी
कि अब इससे फर्क ज्यादा नहीं पड़ेगा कि आप
इस कोड को आप चाहो तो वैसे तो रन करा सकते
हो इसको भी कि आप इसको मैक पे रन कर रहे
हो या विज पे उसको बेसिकली अब रन कराने के
लिए एक
python-pip वीएम मिल जाएगा वहां हम रन करा
देते हैं
अच्छा अब एक इंटरेस्टिंग बात क्या है कि
आपका जो बाइट कोड है ना वो एक्चुअली में
फास्टर रन करता है क्योंकि जो भी चेक्स
करने थे सिंटेक्स वगैरह के जो भी पार्सिंग
वगैरह करनी थी वो सब हो चुकी है मोस्टली
पूरी तरह से नहीं होती है बट मोस्टली आपकी
हो चुकी होती है इसलिए बाइट कोड जो है वह
कंपैरेटिव आपकी स्क्रिप्ट से तो कंपैरेटिव
ज्यादा फास्ट रन करता है इसलिए बाइट कोड
python2 कोड है ना यह जो हमारी फाइल दिखी
थी हमें स्टार्टिंग में जो डॉट प वाईसी
लंबा सा नाम था हेलो अंडर चाय समथिंग
समथिंग वो एक्चुअली में जो डॉट पवाई है वो
एक्चुअली में आपका कंपाइल्ड
pythonanywhere.com
को कुछ एक इंडिपेंडेंट मशीनस भी लगती है
जो कि आपको डसी या इस तरह का कोड
प्रोड्यूस करती है
python3 का ही होता है तो देखा कितना छोटा
सा प्रोग्राम है लेकिन वहां पे लिखा जाता
है इतना सब कुछ अब हमारे पास एक और फोल्डर
जो आया था वो आया था
अ पा कश अब क्या है कई बार जब आप इस तरह
का सॉफ्टवेयर लिखते हैं तो आपकी जो यह
फ्रोजन बाइनरीज हैड पसी है अ यह कई बार
डिलीट होके रिकंस्ट्रक्ट भी होती है कई
बार इसके वर्जंस भी बनते हैं कई क्योंकि
आप जैसे-जैसे कोड में चेंज करोगे उतना ही
तो कोड लिखोगे नहीं तो अलग-अलग चेंज करोगे
तो उस हिसाब से वोह सारी अगर आपके मेन
फोल्डर के अंदर आएगी तो सोचिए कितनी सारी
फाइल्स आपके पास भर गई है तो सिर्फ उन्हीं
को ऑर्गेनाइज्ड रखने के लिए
python.py के अंदर जब भी आप काम करेंगे तो
आपके ये अंडरस्कोर अंडरस्कोर और लास्ट में
भी अंडरस्कोर अंडरस्कोर आपका पीछा नहीं
छोड़ेंगे ये कई जगह आपके यूज़ आएंगे ये
सिर्फ एक अ ये चीज दर्शाता है कि ये चीजें
python's में तो इसी तरह के ये
pythonanywhere.com को कुछ एक अलग वैल्यू
देती है कुछ अलग समझती है तो अलग-अलग
रोल्स हैं उसके वो हम आगे जाके देखेंगे बट
अभी के लिए ता जान लो कि हां ये जैसे ही
आपने लिखा अंडर अंडर स्टार्ट और एंड में
तो मतलब आप कुछ एक इंपॉर्टेंस दर्शा चाह
रहे हो उसका पाइथन के लिए हो सकता है
पाइथन उसको इंटरनल यूज में ले या फिर हो
सकता है आप कुछ फीड करना चाह रहे हो
python.py -31 2pc इस नाम के अंदर क्या है
दो चीजें मेन इंपॉर्टेंट होती है एक आपका
सोर्स चेंज अच्छा मैंने चेंज के अंदर यहां
पे हम लिखना ही भूल गए ठीक है जी ये लीजिए
अभी लिख देते हैं चेंज ठीक है तो एक तो
आपका सोर्स चेंज जैसे-जैसे आपका सोर्स कोड
चेंज होगा तो क्या होता है मोस्टली ये जो
प्रोग्रामिंग लैंग्वेजेस ये जितनी भी होती
है ना ये कुछ ना कुछ डिफिंग एल्गोरिदम यूज
करती है यानी कि डिफरेंस फाइंडिंग
एल्गोरिथम ये क्या करती है कंपेयर करती है
कि आपका जो पहले का सोर्स कोड था उससे
हमने कुछ पी वाईसी बनाया अब आपने कुछ
सोर्स कोड में चेंज कर दिया तो कितना चेंज
कर दिया पूरा कंप्लीट फिर से नहीं बनता है
सिर्फ जो चेंजेज होते हैं वो वहां पे जाते
हैं जैसे आपने कभी गेट यूज़ करा हो तो गेट
वापस से पूरा सोर्स कोड थोड़ी ना पुश करता
है जिन फाइल्स में सिर्फ चेंज है वो
चेंजेज को पुश करता है तो उसी तरह से कुछ
यहां पे भी सोर्स चेंज के लिए डिफिंग
एल्गोरिथम्स यूज होती है
pythonanywhere.com
जब आप स्टैंडर्ड पाइथन के बारे में बात
करते हैं तो यानी कि हम सी पाइथन का जो
इंटरप्रिटेशन है वह हम यूज़ कर रहे हैं आप
ज्यादातर यही यूज़ करने वाले हो बट ऐसा
नहीं है कि यही है बहुत सारे और वर्जन भी
है तो यहां पे ये जो पी वाईसी बन रहा है
उसके लिए पाइथन का वर्जन भी इंपॉर्टेंट
होता है इसलिए इसने नाम दिया सी
pythonanywhere.com
नहीं लिख दिया उसने उसने
python.py न की हमारी जो बाइनरीज बनी है
बाइट कोड बना है बाइनरीज तो नहीं बाइट कोड
बना है यह एक्चुअली में
python3.8 वर्जन पे बना है इसने यूज़ करा
है स्टैंडर्ड पाइथन का सी पाइथन और वहां
से हमारे पास ये अ फ्रोजन बाइनरीज आई है
ओके यह एक और अभी रिसेंटली ही रिसेंटली
मेरा मतलब है कुछ तीन चार पा साल के अंदर
ही ये इंप्लीमेंटेशन हुआ है यह जो आपका डॉ
पवाई फाइल है ये आपकी इंपोर्टेड फाइल्स पे
बनेगा इसीलिए मैंने आपको जो पहला ही हमने
वीडियो इंट्रोड्यूस किया था जहां पे सिर्फ
हेलो वर्ल्ड लिख के ज्यादातर छोड़ देते
हैं मैंने आपसे कुछ इंपोर्ट भी करवाया
थोड़ा एक्स्ट्रा पेन दिया आपको क्योंकि ये
जो चीज है ना ये पूरी कहानी ये एक्चुअली
में इंपोर्टेड फाइल्स पे ही आती है ये कभी
भी टॉप लेवल फाइल्स पे नहीं आती टॉप लेवल
फाइल से मेरा मतलब है जब पूरे फोल्डर के
अंदर फाइल ही एक हो आप कुछ इंपोर्ट
एक्सपोर्ट कर ही नहीं रहे हो तो फिर
ओबवियस सी बात है क्यों ही इसका जरूरत
पड़ेगा क्यों ही ऑप्टिमाइजेशन की इतनी
जरूरत पड़ेगी एक ही तो फाइल है सीधा ही
हमारी जो पाइथन वर्चुअल मशीन है उसमें
डालो और काम खत्म करा दो बट जब चीजें इधर
से उधर से इंपोर्ट होती है तब
ऑप्टिमाइजेशन की जरूरत आती है कि क्या
बेस्ट तरीका हो सकता है कि उसको हम लेके आ
सकें और इंटरनल कंपाइलर आपके काम करते हैं
तो ये हो गया हमारा बेसिक पूरा काम अब
छोटा सा डिस्कशन हम पीवीएम पे भी कर लेते
हैं देखिए पीवीएम जब बोलते हैं ना पाइथन
वर्चुअल मशीन तो बड़ा ही ऐसा लगता है कि
अरे यार कुछ भयंकर वाला डिस्कशन कर दिया
हमने अ जबकि कुछ है नहीं इतना ज्यादा एक
बेसिकली छोटा सा सॉफ्टवेयर है वर्चुअल
मशीन और उसके अंदर क्या है कंटीन्यूअसली
एक लूप चलता रहता है अ जिस लूप के अंदर आप
जैसे ही कोई भी फाइल फेड करते हो उसको
एग्जीक्यूट कर देता है सारा का सारा बस
इतना सा काम है उसका अब हो सकता है आप
उसके अंदर बाइट कोड फीड कर रहे हो तो वो
कंटीन्यूअसली तो लूप चल ही रहा है बाइट
कोड जैसे ही दिया तो उसने स्टार्ट से लेके
एंड तक उसको एग्जीक्यूट करा दिया और
इसीलिए
python-tk ही फीड होता है पीवीएम की सबसे
अच्छी बात ये है कि आप डायरेक्ट python's
भी उसमें दे सकते हो और इसीलिए आपका
पीवीसी सबके लिए जनरेट नहीं होता है जो
बेसिक आपकी टॉप लेवल फाइल्स है कुछ आपने
main.py h पवा कुछ लिखा है तो वहां पे
आपको कभी देखने को ही नहीं मिलता है अब
मोस्टली जो ऑनलाइन आपके कंपाइलर्स हैं या
इस तरह के हैं ये चीजें आपसे हाइड कर देते
हैं वो आपको नहीं बताएंगे कि एक ऐसा हिडन
फोल्डर भी जनरेट हुआ है तो अ इसीलिए मैं
कहता हूं इंस्टॉल करो चीजों को देखो और
थोड़ा सा प्रॉब्लम लो अच्छा यह जो पीवीएम
है ना इसको एक रन टाइम इंजन भी बोला जाता
है जैसे हर लैंग्वेज को ना एक रन टाइम
इंजन चाहिए ही होता है और बिना रन टाइम
इंजन के ना को वर्क करना तो पॉसिबल ही
नहीं है ऐसा है कि बिना इंजन के आप कार
चला रहे हो तो बिना इंजन के कार नहीं चलती
अब आप उसमें चाहे डीजल इंजन डालो पेट्रोल
इंजन डालो या फिर इलेक्ट्रिक इंजन एक इंजन
तो चाहिए का इसीलिए कई लैंग्वेजेस जैसे
आपने अगर मुझसे जावास्क्रिप्ट पढ़ी हो तो
वहां पे भी मैं इंजन की काफी बात करता हूं
कि जैसे अपना नोड का जो v8 इंजन है वो
एक्चुअली में कोड रन करता है नोड रन नहीं
करता है नोड तो उसके ऊपर अराउंड एक रैपर
है इसी तरह से जो आपका पाइथन होता है यहां
पे हमारे पास 1000 इंजन नहीं है हमारे पास
सीधा पीवीएम है जो कि डायरेक्टली पान . से
आता है सब यही इंजन उठाते हैं और कोई
नोटबुक में लगा देता है कोई उसको मिनी
कोंडा में लगा देता है तो काम अपना यही
होता है बट बेसिकली उसी को ही रन टाइम
इंजन कहा जाता है अब इसीलिए जैसा कि मैंने
बताया इसको पाइथन इंटरप्रेटर हम बोलते हैं
तो इसीलिए उम्मीद है आपको अब काफी कुछ
इसका समझ में आया
होगा जो लोग शायद पहली बार सीरीज देख रहे
हैं हमारा थोड़ा सा ऐसा रॉ चलता है कभी
चाय पीते हैं साथ में कभी पानी पीते हैं
चलता रहता है अपना ऐसे ठीक है एक कुछ
इंपॉर्टेंट नोट्स आपके इंटरव्यू
पर्सपेक्टिव के लिए अगर आप हाई एंड
कंपनियों में काम करना चाह रहे हैं या ओपन
सोर्स जो कंपनियां होती है वह इस तरह की
बिहाइंड द सीन डिटेल्स काफी पूछती है वो
सिर्फ आपसे ये नहीं कहेगी कि यह प्रिंट
करा दो या यह पाइथन बना दो इसीलिए पाइथन
के अंदर एंथियास बहुत है और रिजेक्शन बहुत
ज्यादा है क्योंकि वो इन डेप्थ नॉलेज की
बहुत ज्यादा कमी है सबसे पहली चीज तो आपको
पता होनी चाहिए कि बाइट कोड ना मशीन कोड
नहीं है यह डायरेक्ट इंस्ट्रक्शन नहीं है
जो आप अपनी
होता है आपके हार्डवेयर के लिए लेकिन बाइट
कोड ना मशीन कोड नहीं है तो इसलिए याद
रखना बाइट कोड कभी भी नहीं होता है किसी
भी लैंग्वेज में अगर बाइट कोड बन रहा है
ना वो कभी भी मशीन का इंस्ट्रक्शन नहीं है
मशीन का इंस्ट्रक्शन जैसे असेंबली
लैंग्वेज प्रोड्यूस करती है या फिर आपकी
कोई भी लैंग्वेज प्रोड्यूस करती है जो
डायरेक्टली हार्डवेयर को इंस्ट्रक्शन दिया
जाता है तो बाइट कोड वो नहीं है ये याद
रखना बाइट कोड ना यहां पे
pythonanywhere.com जावा की वर्चुअल मशीनस
वगैरह होती है उसमें आप फीड कर दो तो नहीं
यह पूरा ऑप्टिमाइज भी उसके लिए हुआ है
लिखा भी उसी के लिए गया है स्पेसिफिकेशन
भी उसी की है तो यह पाइथन स्पेसिफिक
इंटरप्रिटेशन है अच्छा अब इतनी बात कर ली
तो थोड़ी सी बात इस पे भी कर लेते हैं अभी
देखिए हमने जो यूज़ करा वो यूज़ करा सी
पाइथन और आप मेजॉरिटी केसेस क्या 90 पर
केसेस में आप सी पाइथन ही यूज़ करने वाले
हो कुछ एक एक्सेप्शन होते हैं वहां पे
जरूर आप कुछ इसका अलग वर्जन या अलग
ऑप्टिमाइजेशन वगैरह यूज़ कर लेते हो बट
ज्यादातर केसेस में आप सी पाइथन यूज़
करोगे जब भी भी स्टैंडर्ड पाइथन या पाइथन
नॉर्मल किसी ने कहा है तो उसका मतलब है
स्टैंडर्ड इंप्लीमेंटेशन उसका मतलब है सी
पाइथन और रेगुलर जितने भी आपके पैकेजेस
मैनेजर्स हैं या नटू में आप इंस्टॉल करो
तो हमेशा आपके सी पाइथन ही डिफॉल्ट आएगी
इसीलिए बाकी जितने वर्जंस है उनको
स्पेसिफिकली मेंशन करना पड़ता है कि नहीं
नहीं नहीं मैं पंगे सी पाइथन से नहीं ले
रहा हूं मुझे पंगा लेना है किसी और
वेरिएंट के पाइथन से अब और वेरिएंट है कौन
से देखिए जाइथन भी है एक जिसको जे पाइथन
बोलते हैं जाइथन ज्यादातर तो मैंने नहीं
सुना बोलते हुए बट जे पाइथन नहीं बोलते
हैं इसको इसी तरह से आयरन पाइथन भी है जे
पाइथन ओबवियस सी बात है जावा की बाइनरीज
के साथ जब आपको अ कुछ वर्क करना होता है
तब उस तरह से आगे जाके हम और डिस्कशन
करेंगे कि क्या मतलब है मेरा कि अ जावा की
बाइनरी से या फिर जावा में बात करने से वो
भी बा आपको बाद में बताएंगे और उसके बाद
यह आयरन पाइथन भी होता है इसके अलावा
स्टैक लेस भी है पाई पाई भी है जैसे कॉन
करेंसी में आपको ज्यादा काम करना है तो आप
स्टैक लेस वर्जन यूज़ करते हो परफॉर्मेंस
ओरिएंटेड ज्यादा करना है तो आप पाई पाई
यूज़ करते हो और ये सिर्फ कुछ नाम लिखे
हैं और भी बहुत सारे नाम है पाइ बड़ी
इंटरेस्टिंग लैंग्वेज है और इसलिए मुझे
ज्यादा मजा आता है
python-pip के अंदर होता है हमने सिर्फ
हेलो वर्ल्ड लिखा और इतना सारा इंटरनल काम
हो गया बट आपको शायद देखने में लगे कि
बहुत इंटरनल काम हुआ है बट मेरी नजर से
अगर देखोगे तो लगेगा इतना ही काम है अब
चाहे कोड में कुछ भी लिखूं और ज्यादा
बिहाइंड द सीन इंटरनल डेप्थ नहीं आ रही है
अब तो मुझे बस सिंटेक्स सीखना है यह
लैंग्वेज कैसे-कैसे काम करनी है उसके
स्टैंडर्डाइज्ड फीचर मुझे जानने और बस
मुझे अपना काम करना है तो इसीलिए मैं कहता
हूं python2 चीजें नहीं है एक जो हमारा
थ्योर डिस्कशन आता है थोड़ा सा वो मेमोरी
को लेके आता है इ
म्यूटेशन एक आपको बदलना पड़ता है उसके बाद
म्यूटेशंस यही था एक छोटा सा वीडियो अ
बिहाइंड द सीन पाइथन की इनर वर्किंग के
बारे में अगर आपको ये वीडियो अच्छा लगा हो
तो प्लीज प्लीज शेयर करिएगा क्योंकि इस
तरह के इनर वर्किंग वीडियोस को लोग शेयर
कम करते हैं इसीलिए यह वीडियोस कम बनाए
जाते हैं पर आप अगर शेयर करेंगे और लोगों
को बोलेंगे कि नहीं हमें ऐसे वीडियोस पसंद
है तो बाकी क्रिएटर्स भी फिर बनाएंगे तो
सबका भला है इसके अंदर तो प्लीज शेयर
करिएगा फटाफट से और एक छोटा सा असाइनमेंट
आपके लिए कि अगर आपको ये इनर वर्किंग समझ
में आई थोड़ी और रिसर्च करिएगा इसके ऊपर
और इसके ऊपर एक अच्छा सा आर्टिकल लिखेगा अ
वन ऑफ माय फेवरेट वेबसाइट हैश नोड जिस पे
सारे डेवलपर्स ही ब्लॉग लिखते हैं तो वहां
पे लिखिए और इस वीडियो को एंबेड जरूर
करिएगा उसके अंदर और शेयर कीजिएगा मुझे भी
करने का मन हो तो कर लीजिएगा कोई ऐसा
फोर्स नहीं है और कोई ऐसा कंपल्शन नहीं है
बट हां एक कंपल्शन है चाय पीते रहिए कोड
एंजॉय करते रहिए चलिए सब्सक्राइब कर दिया
तो ठीक है नहीं कर दिया तो हम भी कहीं
नहीं जा रहे मिलते हैं आपसे अगले वीडियो
में
Voir Plus de Vidéos Connexes
Belajar Python [Dasar] - 03 - Cara Kerja Program dan bytecode
Python Bytecode: An Introductory Tutorial
Our First Python Program | Python Tutorial - Day #4
Introduction to Spyder - Part 2
Introduction to Python Programming | Python for Beginners #lec1
Download and Install Python (3.10.6) and Pycharm | Python Tutorials for Beginners #lec3
5.0 / 5 (0 votes)