1 / 34

Python

Python. Team Avengers. HISTORY. 1991 Guido van Rossum Centrum Wiskunde & Informatica ABC & Amoeba Influences ABC, C, Algol-68 & Icon Modula-2+ & Modula-3. Changes -Garbage collector & UNIX -OSS - CPython and others “Programming Languange of the Year”

deo
Download Presentation

Python

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Python Team Avengers

  2. HISTORY

  3. 1991 • Guido van Rossum • Centrum Wiskunde & Informatica • ABC & Amoeba • Influences • ABC, C, Algol-68 & Icon • Modula-2+ & Modula-3

  4. Changes -Garbage collector & UNIX -OSS -CPython and others • “Programming Languange of the Year” -TIOBE, 2007 and 2010 -PyCon

  5. DESIGN & RATIONALE

  6. Rationale • ABC • Didn’t have enough features • Impossible to improve language • Amoeba • simpler way to develop system administration programs • C program & Bourne shell script took too long • From there, he attempted to create a similar language not so similar to ABC with the Amoeba system calls.

  7. Rossum wanted results as quickly as possible • Made the philosophy of taking shortcuts • Borrowed ideas from other languages • ABC • Amoeba. • C

  8. Design • Similar to C: • Same keywords. • Operators. • Different to C: • No semi-colons • No braces • C: • if (a < b) {max = b;} else {max = a;} • Python: • if a < b:max = belse:max = a

  9. Exceptions • Errors found while a program is executed, are • Used for error handling. • Exceptions handlers • try • except • finally • Handlers made to take care of exceptions

  10. All objects are “FIRST CLASS • Ability to assign any object to anything • Variable • Placed on lists • Passed as an argument. • Easy because objects based on a C data structure • Drops compile-time type checking • All type checking during run-time.

  11. Hash table implementation replaced sorted tables • Felt it would be faster & easier than ABC’s B-tree.

  12. Every statement is executable • Made Python simpler & easier to write by allow nesting functions class some_class(parent_class):defdoOp(self, x, y):def add(x, y):            return x + y        return add(x, y)

  13. FEATURES & PHILOSOPHY

  14. Features • Powerful multi-paradigm high level language • Object oriented • Imperative • Automatic memory management • Large standard library of resources • 100+ modules and growing • Includes third-party modules • Implemented other languages’ libraries such as C & ABC • Great for novice programmers

  15. Python 1.0 • Dynamic type • Exception handling • Programming Tools • Lambda • Filter • Reduce • Short learning curve • Asserted statements

  16. Built in support for importing hierarchical module names • Comparison able to raise exceptions • New dictionary methods • Clear() • Copy() • Update() • Easy for Python to be embedded • Compatible with GNU General Public License

  17. Python 2.0 • Garbage collector • Unicode • List comprehensions • Introduced string methods • Unification • Generators

  18. Requested Augmented Assignment • y= y + 2 becomesy+= 2 • Compiler work more efficiently • More transparent & community-backed

  19. Python 3.0(Python 3000/Py3k) • Removed redundant constructs & modules • Replaced print statement as function • Customization of separator between items • Views & iterators replaces lists • Rules of ordering comparisons were simplified and use of integers • Ex “int” replaced “long” • Text and binary data

  20. Philosophy • Fun & user- friendly • Versatile • Presentation and aesthetic syntax • Clear and highly readable • Widely spaced and organized • Indentation as block delimiters • Concise & simple • “There should be one-and preferably only one-obvious way to do it”

  21. Freedom to use different style • Object-oriented • Structured • Functional • Aspect-oriented • Highly extensible • Freedom write modules in C or C++ • Great glue language

  22. PROS & CONS

  23. Free, open-source unlike some other languages. Easy to understand and program. Simple structure marked with easy to recognize symbols. Primarily a scripting language very suitable for internet applications. PROS

  24. Python supports multiple programming paradigms, primarily, but not limited to, object-oriented, imperative, and to a lesser extent, functional programming styles. Python is also dynamic, consisting of garbage collection. Easy integration with C++ and Java which allows the programmer a wider scope and ways to solve a particular problem.

  25. Interfaces, or connections with many function calls, libraries &many Windows based systems as well. ‘Zope’ – widely used & easily understood content management tool, primarily used today in Europe. Enables programmers to easily design websites that can be modified by owners without the programmer interaction. Jython - very appealing program to programmers particularly savvy with Java. Completely written in Java with easy access to Java libraries, faster development & testing of applications.

  26. Cons • When scripting with Python there is one and only one way to solve a problem, but with its competitor Ruby there are more than one way to solve a problem. • Database access layers are also very primitive compared to other established technology like OBDC. • Very few tools enabling multiple user programming.

  27. Python also lacks a fully functional Integrated Development Environment (IDE) which also makes it a horrible candidate for creating Graphical User Interfaces and multitasking. • Requires much more extensive testing. • Strange documentation • Lack of end statements

  28. APPLICATIONS

  29. Forecastwatch • Used in all of components. • Standard Python Libraries • Collecting • Parsing • Storing • Minimized PHP URL’s

  30. Most Useful Libraries • Thread • Normal Expression • Object Serialization • Gzip Data Compression • Threading library for scaling the coverage to over 800 cities.

  31. Facebook • Uses MySQL backbone • Multiple large data libraries useful for data on Facebook. • Python based program, Tornado, as part of its data infrastructure.

  32. Civilization IV • Python for most tasks • boost.python allows access parts of game • Style • Content of the interface screens • Modify random map generation & add complex scripted events.

  33. Youtube • “Produce maintainable features in record times, with a minimum of developers.” • Quick development times • Great for writing larger programs • Great object-oriented features.

  34. Google • Google Groups, Gmail, Google maps & search engine internals. • Large data libraries & ease of programmability. • Easily readable language

More Related