Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Python
 
History <ul><li>Created by Guido von Rossum in 1990 (BDFL) </li></ul><ul><li>and named after Monty Python's Flying Circus ...
E.g. Projects with Python <ul><li>Websites: Google, YouTube, Yahoo Groups & Maps, CIA.gov </li></ul><ul><li>Systems: NASA,...
What is Python <ul><li>Very high level scripting-cum-programming language (almost like pseudo-code) </li></ul><ul><li>Mult...
Philosophy <ul><li>“ there is one -and preferably only one- obvious way to do it” </li></ul><ul><li>“ The long-term useful...
Readability <ul><li>Forced indentation </li></ul><ul><li>No curly brackets / do..end / if...endif </li></ul><ul><li>No sem...
Syntax <ul><li>Types:  </li></ul><ul><li>str, unicode  </li></ul><ul><li>list, tuple, set </li></ul><ul><li>dict </li></ul...
Why Python? <ul><li>Readability, maintainability </li></ul><ul><li>Fast development and all just works the first time... <...
 
Some problems  <ul><li>Scripting-like language and compiled and runtime - hence slower than C/C++ and slightly slower than...
EXAMPLES
Example: Old Directory Cleanup Script
Example: Simple XML Processing
Example: Simple Spell Checker in 21 Lines
Upcoming SlideShare
Loading in …5
×

Why Python

2,712 views

Published on

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

Published in: Technology, Education
  • Be the first to comment

Why Python

  1. 1. Python
  2. 3. History <ul><li>Created by Guido von Rossum in 1990 (BDFL) </li></ul><ul><li>and named after Monty Python's Flying Circus </li></ul><ul><li>Influences: ABC, Lisp, Perl, Haskell and Java </li></ul><ul><li>Developed and supported by a large team of volunteers - Python Software Foundation </li></ul><ul><li>Major implementations: CPython, Jython, Iron Python, PyPy </li></ul>
  3. 4. E.g. Projects with Python <ul><li>Websites: Google, YouTube, Yahoo Groups & Maps, CIA.gov </li></ul><ul><li>Systems: NASA, LALN, CERN, Rackspace </li></ul><ul><li>Games: Civilization 4, Quark (Quake Army Knife) </li></ul><ul><li>Mobile phones: Nokia S60 (Symbian), PythonCE </li></ul><ul><li>P2P: BitTorrent </li></ul>
  4. 5. What is Python <ul><li>Very high level scripting-cum-programming language (almost like pseudo-code) </li></ul><ul><li>Multi-paradigm: OOP, Structured, Functional, Aspect-oriented </li></ul><ul><li>Multi-platform </li></ul><ul><li>Dynamic Typing </li></ul><ul><li>Automatic garbage collector for memory management </li></ul>
  5. 6. Philosophy <ul><li>“ there is one -and preferably only one- obvious way to do it” </li></ul><ul><li>“ 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.” </li></ul><ul><li>- Eric Raymond, 'Why Python?' 2003 </li></ul>
  6. 7. Readability <ul><li>Forced indentation </li></ul><ul><li>No curly brackets / do..end / if...endif </li></ul><ul><li>No semicolons </li></ul>
  7. 8. Syntax <ul><li>Types: </li></ul><ul><li>str, unicode </li></ul><ul><li>list, tuple, set </li></ul><ul><li>dict </li></ul><ul><li>int, float, complex, bool </li></ul><ul><li>Conditions: </li></ul><ul><li>if, elif, else </li></ul><ul><li>Loops: </li></ul><ul><li>for...in </li></ul><ul><li>while </li></ul>
  8. 9. Why Python? <ul><li>Readability, maintainability </li></ul><ul><li>Fast development and all just works the first time... </li></ul><ul><li>Dynamic typing and automatic memory management </li></ul><ul><li>Paradigm of your choice </li></ul><ul><li>Extensive library </li></ul>
  9. 11. Some problems <ul><li>Scripting-like language and compiled and runtime - hence slower than C/C++ and slightly slower than Java </li></ul><ul><li>Memory economy hard to achieve (high level data-structures) </li></ul><ul><li>Multiprocessing and Global interpreter lock </li></ul>
  10. 12. EXAMPLES
  11. 13. Example: Old Directory Cleanup Script
  12. 14. Example: Simple XML Processing
  13. 15. Example: Simple Spell Checker in 21 Lines

×