Why Python
Upcoming SlideShare
Loading in...5
×
 

Why Python

on

  • 1,860 views

A quick talk I gave at work on Python, its philosophy and why to use it...

A quick talk I gave at work on Python, its philosophy and why to use it...

Statistics

Views

Total Views
1,860
Views on SlideShare
1,819
Embed Views
41

Actions

Likes
3
Downloads
58
Comments
0

7 Embeds 41

http://arnavk.blogspot.com 28
http://192.168.6.52 4
http://theoldreader.com 3
http://www.slideshare.net 2
http://arnavk.blogspot.co.uk 2
http://www.akhare.org 1
http://arnavk.blogspot.in 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Why Python Why Python Presentation Transcript

  • Python
  •  
  • History
    • Created by Guido von Rossum in 1990 (BDFL)
    • and named after Monty Python's Flying Circus
    • Influences: ABC, Lisp, Perl, Haskell and Java
    • Developed and supported by a large team of volunteers - Python Software Foundation
    • Major implementations: CPython, Jython, Iron Python, PyPy
  • E.g. Projects with Python
    • Websites: Google, YouTube, Yahoo Groups & Maps, CIA.gov
    • Systems: NASA, LALN, CERN, Rackspace
    • Games: Civilization 4, Quark (Quake Army Knife)
    • Mobile phones: Nokia S60 (Symbian), PythonCE
    • P2P: BitTorrent
  • What is Python
    • Very high level scripting-cum-programming language (almost like pseudo-code)
    • Multi-paradigm: OOP, Structured, Functional, Aspect-oriented
    • Multi-platform
    • Dynamic Typing
    • Automatic garbage collector for memory management
  • Philosophy
    • “ there is one -and preferably only one- obvious way to do it”
    • “ The long-term usefulness of a language comes not in its ability to support clever hacks, but from how well and how unobtrusively it supports the day-to-day work of programming. The day-to-day work of programming consists not of writing new programs, but mostly reading and modifying existing ones.”
    • - Eric Raymond, 'Why Python?' 2003
  • Readability
    • Forced indentation
    • No curly brackets / do..end / if...endif
    • No semicolons
  • Syntax
    • Types:
    • str, unicode
    • list, tuple, set
    • dict
    • int, float, complex, bool
    • Conditions:
    • if, elif, else
    • Loops:
    • for...in
    • while
  • Why Python?
    • Readability, maintainability
    • Fast development and all just works the first time...
    • Dynamic typing and automatic memory management
    • Paradigm of your choice
    • Extensive library
  •  
  • Some problems
    • Scripting-like language and compiled and runtime - hence slower than C/C++ and slightly slower than Java
    • Memory economy hard to achieve (high level data-structures)
    • Multiprocessing and Global interpreter lock
  • EXAMPLES
  • Example: Old Directory Cleanup Script
  • Example: Simple XML Processing
  • Example: Simple Spell Checker in 21 Lines