PYTHON - PowerPoint PPT Presentation

zelig
python n.
Skip this Video
Loading SlideShow in 5 Seconds..
PYTHON PowerPoint Presentation
play fullscreen
1 / 19
Download Presentation
110 Views
Download Presentation

PYTHON

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. PYTHON • Mitch Martin • Josh Amick • Abdulla Al-nuaimi • Brad Gunnells

  2. Points of Interest • Overview • Language evolution • Language concepts • Examples of usage • Comparison and Popularity • Impact and Assessment

  3. What is Python? • Interpreted, Interactive and Object-oriented • Remarkable power with clear syntax • Interfaces to system calls and libraries • Extensible in C or C++ • Portable (Unix, Mac, MS-DOS, Windows, OS/2) • Incorporates: modules, exceptions, dynamic typing, very high level dynamic data types, and classes

  4. Python name? • Looking for name that was short, unique, and slightly mysterious • Guido van Rossum was reading “Monty Python’s Flying Circus” at the time • Decided to call new language PYTHON

  5. History • Created by Guido van Rossum • Started during Christmas holidays 1989 • Spent year working on own time • Success using it in Amoeba Project • Prompted him to keep improving it


  6. Problem Domain • Guido van Rossum needed a scripting language like ABC that could access Amoeba system calls. • He also realized it would need to be extensible so it wouldn’t be specific to the Amoeba Project.

  7. Problem Domain cont. • ABC • Use of indentation for statement grouping • Very-high-level data types • Implementation very different • Lack of extensibility led to:

  8. Problem Domain cont. • Had experience with Modula-2+ • Talked to designers of Modula-3 • Read Modula-3 report • Origin of syntax and semantics used for exception handling

  9. Language Concepts • Dynamically Typed • No need for type declarations before use • Clean and Concise Syntax • No Braces or semicolons • Indentations define blocks -> • No Switch Statement • Use if...elif...elif...else • One Constructor per Class Example: if x == y: ...block elif x > y: ...block else: ...block

  10. Sample Code class Student(): def __init__(self, argStudentName, argGPA = 0, argClass = "freshman"): self.StudentName = argStudentName self.GPA = argGPA self.Class = argClass ...

  11. Sample Code

  12. Sample Code (cont.)

  13. Python Compared to Other Languages • Scripting language • High-Level language • Syntax • Emphasizes readability • Indentation • If, while, for http://en.wikipedia.org/wiki/Image:Python_add5_syntax.png

  14. Comparison con't. • Free under GNU GPL • Object oriented • Very similar to Perl, Ruby, Scheme, Smalltalk & Tcl • Can work with other languages such as Java and C/C++ • Types – Variables • Duck – Latent typing • Does not enforce static typing • Strongly typed

  15. Python Popularity • Relatively young language – Created in early 1990's • Tens of thousands of users • NASA, AstraZeneca and Honeywell, Industrial Light and Magic, Google, Yahoo http://www.python.org/pics/pythonHi.gif

  16. Usage • It can handle small and big projects. • Actively used in industry and academia. • It utilizes some of the largest projects Such as: • Zope: application server • BitTorrent: file sharing • Google: used extensively

  17. Future development • Python 3.0 (Python 3000) • New features: • moving map, filter and reduce out of the built-in namespace. • adding support for optional type declarations. • unifying the str/unicode types, and introducing a separate mutable bytes type. • converting built-ins to returning iterators (instead of lists), where appropriate. • removing backward-compatibility features like classic classes, classic division, string exceptions, and implicit relative imports.

  18. Questions Questions are guaranteed in life; Answers aren’t ????

  19. Bibliography • http://www.python.org/doc/faq/general/ • http://en.wikipedia.org/wiki/Python_ programming_language • http://www.ibiblio.org/g2swap/byteofpython/read/if-statement.html