Python is a widely used general-purpose, high-level programming language.
Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C. The language provides constructs intended to enable clear programs on both a small and large scale.
Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library.
Like other dynamic languages, Python is often used as a scripting language, but is also used in a wide range of non-scripting contexts. Using third-party tools, Python code can be packaged into standalone executable programs (such as Py2exe, or Pyinstaller). Python interpreters are available for many operating systems.
Features
Python is a
multi-paradigm programming language: object-oriented programming and structured programming are fully supported, and there are a number of language features which support functional programming and aspect-oriented programming (including by metaprogramming and by magic methods). Many other paradigms are supported using extensions, including design by contract and logic programming.
Python uses
dynamic typing and a combination of reference counting and a cycle-detecting garbage collector for memory management. An important feature of Python is dynamic name resolution (late binding), which binds method and variable names during program execution.
The design of Python offers only limited support for functional programming in the Lisp tradition. The language has map(), reduce() and filter() functions, comprehensions for lists, dictionaries,
and sets, as well as generator expressions. The standard library has
two modules (itertools and functools) that implement functional tools
borrowed from Haskell and Standard ML
The core philosophy of the language is summarized by the document "PEP 20 (The Zen of Python)", which includes aphorisms such as:
- Beautiful is better than ugly.
- Explicit is better than implicit.
- Simple is better than complex.
- Complex is better than complicated.
- Readability counts.
Rather than requiring all desired functionality to be built into the
language's core, Python was designed to be highly extensible. Python can
also be embedded in existing applications that need a programmable
interface. This design of a small core language with a large standard
library and an easily extensible interpreter was intended by Van Rossum
from the very start because of his frustrations with ABC (which espoused the opposite mindset).
Melo rahak na...
ReplyDeletepala yako yanna
ReplyDelete