1 / 12

Python Programming Language

Python Programming Language. b y Vasu Chetty. Origins of Python. Created by: Guido van Rossum , a Dutch Programmer Created during: Christmas Break, 1989 Created because: Guido had some free time and an idea for an interpreter Named after: . Python Through the Ages.

chanel
Download Presentation

Python Programming Language

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 Programming Language by Vasu Chetty

  2. Origins of Python • Created by: Guido van Rossum, a Dutch Programmer • Created during: Christmas Break, 1989 • Created because: Guido had some free time and an idea for an interpreter • Named after:

  3. Python Through the Ages • Version 0: Inheritance, exception handling, functions, and core data types of list, str and dict • Version 1: Lambda, reduce(), filter(), and map() • Version 2: Garbage collection and generators • Version 3: Unification of str/unicode types, statements switched to function calls, and instances of list replaced by views and iterators

  4. Why Python? • Freely available • Well-documented • Fosters rapid development • Very high-level object-oriented language • Integration facilities for mixed-language development

  5. Who uses Python? • Google (e.g. code.google.com was written in Python) • New York Stock Exchange (web-based transaction system) • YouTube • NASA • Other common uses include: RSS readers, CGI applications, generating and analyzing logs, and creating HTML calendars

  6. Python Programming Paradigms(say that 10 times fast) • Object-oriented • Iterative (generators) • Imperative (follows sequential steps) • Functional (lambda calculus)

  7. Common Data Types and Elements • Numbers: integer, floating point, complex • Other: boolean, none, string, tuple, list, dictionary, set • Conditionals: if, else, elif • Loops: while, for • Supports: nested loops, function calls from other functions, string concatenation, combined boolean, string, or integer in conditional with “and” or “or”

  8. Functions in Python • Functions are essentially objects, making them very flexible • Functions are considered as first class, so they can be passed to and from other functions • Return values need not be set, return none statements are implicitly built in • Functions can be nested within other functions

  9. Pass-by-value or Pass-by-reference • All parameters in Python are pass-by-reference, but some appear to act as pass-by-value because of the difference between mutable and immutable objects • String, tuples and numbers are immutable, altering them will create a new instance • Lists and dictionaries are mutable, altering them will also change the original object

  10. Type Checking: Dynamic and Strong • Python has dynamic type checking, which means all types are resolved at run-time rather than at compile time • Python uses strong type checking, ensuring type errors are thrown for mismatches in type • As of version 3, Python no longer supports type coercion • Static type inference is not possible in Python

  11. Object-orientedness • Python supports multiple inheritance • Python utilizes static variable and static method inheritance • Super(), in version 3 of Python, is invoked dynamically and calls the superclass method of the same name

  12. Conclusion • Python is an easy-to-use, robust programming language that is freely available • Python’s objects and functions are very versatile • Python is a very high-level object-oriented language • Python is awesome!

More Related