Python 3
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum during 1985 – 1990. Like Perl, Python source code is also available under the GNU General Public License (GPL). Python is named after a TV Show called ‘Monty Python’s Flying Circus’ and not after Python-the snake.Python 3.0 was released in 2008. Although this version is supposed to be backward incompatibles, later on many of its important features have been backported to be compatible with the version 2.7. This tutorial gives enough understanding on Python 3 version programming language.
What is New?
Python 3.x introduced some Python 2-incompatible keywords and features that can be imported via the in-built __future__ module in Python 2. It is recommended to use __future__ imports, if you are planning Python 3.x support for your code.
For example, if we want Python 3.x's integer division behavior in Python 2, add the following import statement.
An overview of Python:
● A scripting language Python is suitable (1) for embedding, (2) for writing small unstructured scripts, (3) for "quick and dirty" programs.
● Not a scripting language (1) Python scales. (2) Python encourages us to write code that is clear and wellstructured.
●
Interpreted, but also compiled to bytecode. Modules are automatically compiled (to .pyc) when imported, but may also be explicitly compiled.
● Provides an interactive command line and interpreter shell. In fact, there are several.
● Dynamic For example:
○ Types are bound to values, not to variables.
○ Function and method lookup is done at runtime.
○ Values are inspectable. ○ There is an interactive interpreter, more than one, in fact.
○ You can list the methods supported by any given object.
● Strongly typed at runtime, not compiletime. Objects (values) have a type, but variables do not.
● Reasonably high level High level builtin data types; high level control structures (for walking lists and iterators, for example).
● Objectoriented Almost everything is an object. Simple object definition. Data hiding by agreement. Multiple inheritance. Interfaces by convention. Polymorphism.
● Highly structured Statements, functions, classes, modules, and packages enable us to write large, wellstructured applications. Why structure? Readability, locateability, modifiability.
● Explicitness
0 Response to "Python 3 - Introduction 1"
Post a Comment