Hi guys! we have already seen comparison of python with other object-oriented programming languages as well as basics and comparison of python2 and python3. Now, let us dive in and start with some of the basics of how to start working with python programming along with features and applications of Python.
In order to know and learn a programming language, you should start right from the roots of its origination and systematically move forward to learn its various advanced topics. Let us start with the building blocks of python programming language.
Building Blocks of Python Programming :
Python is basically an interpreter-based scripting language and it has got many other languages which working in its core for various different functionalities. Actually, Guido van Rossum developed by taking the best from the available languages at that time. You can see that the Python shell works with TCL script running in its behind, while Strings and Regex are processed by using PERL in behind and the Object-oriented features are working as per the principles of OOTcl. This was the actual philosophy behind developing Python that a programming language such that it is easier to read, write and understand. Apart from this there are also several other philosophical principles behind Python. Following are those:
Philosophy behind Python :
- High Coherence: Makes it easier to read, write and maintain.
- Very Powerful: Can solve various complex problems with ease.
- Scope: Can be used to develop and maintain very large systems as well as for rapid development.
- Objects: Object-Oriented feature allows to create objects.
- Integration: It is highly backward-compatible as well as forward compatible. It can work along with languages starting from FORTRAN to C to SCALA and Solidarity. This makes it a best option for development of hybrid-systems and applications.
After understanding the Philosophy let us understand and look into various features of Python due to its above given philosophical values.
Features of Python :
|no compiling or linking||rapid development cycle|
|no type declarations||simpler, shorter, more flexible|
|automatic memory management||garbage collection|
|high-level data types and operations||fast development|
|object-oriented programming||code structuring and reuse, C++|
|embedding and extending in C||mixed language systems|
|classes, modules, exceptions||“programming-in-the-large” support|
|C modules dynamic loading||smaller binaries and simplified extensions|
|C modules dynamic reloading||programs can be modified without stopping|
|universal “first-class” object model||fewer restrictions and rules|
|run-time program construction||handles unforeseen needs, end-user coding|
|interactive, dynamic nature||incremental development and testing|
|access to interpreter information||metaprogramming, introspective objects|
|wide portability||cross-platform programming without ports|
|compilation to portable bytecode||execution speed, protecting source code|
|built-in interfaces to external services||system tools, GUIs, persistence, databases, etc.|
Due to wide range of the features provided by Python, it is used in so many different applications.
Applications of Python Programming :
- shell tools
- system admin tools, command line programs
- extension-language work
- rapid prototyping and development
- language-based modules
- instead of special-purpose parsers
- graphical user interfaces
- database access
- Big data analytics/data science
- distributed programming
- Internet scripting
- and many more…
Although there are many features and wide range of applications of Python, it still has few drawbacks (which are shared by most of the scripting languages), this is basically due to it being a interpreter-based language. Let us see its drawbacks:
Drawbacks of Python Programming :
- not as efficient as C
- However, python has better built-in algorithms for sorting and hashing.
- delayed error notification
- lack of profiling tools
As it is very much like a scripting language it consumes more resources compared to C and other compiled programming languages and file size of a Python code is also much more than a C program file which increases space complexity which is a matter of concern when working on embedded systems.
So I gave you an insight in Python Programming by going through its building blocks, philosophy, features, applications and also its drawbacks. In next post, I will shed light on some most important and basic elements of Python Programming…