Python 3 - Introduction 1

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 well­structured. 

Interpreted, but also compiled to byte­code. 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 inspect­able. ○ There is an interactive interpreter, more than one, in fact. 
  ○ You can list the methods supported by any given object. 

● Strongly typed at run­time, not compile­time. Objects (values) have a type, but  variables do not. 

● Reasonably high level ­­ High level built­in data types; high level control  structures (for walking lists and iterators, for example). 

● Object­oriented ­­ 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, well­structured applications. Why structure? Readability,  locate­ability, modifiability. 

● Explicitness

Subscribe to receive free email updates:

Related Posts :

0 Response to "Python 3 - Introduction 1"

Post a Comment