We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byIsabella Lucas
Modified over 3 years ago
Why I Invented Python EuroPython – June 27, 2005 Guido van Rossum Elemental Security, Inc. firstname.lastname@example.org email@example.com
June 27, 2005© 2005 Guido van Rossum 2 About 30 Years Ago... Discovered computers and programming Learned Algol-60, Fortran and Pascal (in that order!) Enjoyed programming more than anything Wanted better tools, and started creating them Started sharing with others Started learning about other languages
June 27, 2005© 2005 Guido van Rossum 3 About 20 Years Ago... Knew C and Unix really well Worked on implementing ABC, a new language Ported it to Mac and PC (DOS) Was really excited by the authors' philosophy Was disappointed by ABC's lack of integration Saw its failure to gain acceptance
June 27, 2005© 2005 Guido van Rossum 4 About 15 Years Ago... Worked on implementing Amoeba, a new OS Found it needed a scripting language "To bridge the gap between shell and C" Wanted ABC's elegance in that scripting language Had some time on my hands Had some ideas on language implementation
June 27, 2005© 2005 Guido van Rossum 5 Python's Birth Xmas 1989 About two weeks of time off with no plans Had it all in my head Fat Mac with Lightspeed C on 20 MB hard drive First code: a parser generator Soon followed: a running program!
June 27, 2005© 2005 Guido van Rossum 6 Some Design Goals Shell-like (interactive prompt as well as script files) Extensible architecture (create new types) One tool amongst many, work well with others Additional functionality implementable separately Avoid Not-Invented-Here syndrome (borrow freely) Doable as a one-person project (cut some corners)
June 27, 2005© 2005 Guido van Rossum 7 Why Object Oriented? One word: extensibility The original design was OO inside and used OO notation for method access, but did not support user-defined classes Method access was generalized to namespaces One unified namespace for everything in a module Each object is a namespace in its own right A module is just another object Name lookup is customized per namespace User-defined classes were added within the first year, but for a long time remained second-class citizens (until new-style classes in Python 2.2)
June 27, 2005© 2005 Guido van Rossum 8 Good Things About ABC Five powerful data types: –list, table, tuple, number, text Orthogonality an important principle No limits: values can be as large as fits in memory Numbers represent mathematical values, not bits Powerful string processing built-in No type declarations; assignment creates variables Simple control structures: IF, SELECT, WHILE, FOR Interactive >>> prompt
June 27, 2005© 2005 Guido van Rossum 9 Not-so-good Things About ABC Monolithic implementation; hard to add new things Hard to interact with file system Reinvented programming terminology Apostrophe (') in identifiers; UPPERCASE keywords List is unordered multi-set (bag); table is sorted Small strings relatively slow Assignment: PUT expression IN variable No error handling (errors return to >>> prompt) Editing environment too closely integrated Appealed most to people with insufficient computer access; hard to establish "early adopter" community in Unix world due to lack of OS integration
June 27, 2005© 2005 Guido van Rossum 10 What I Changed Extensibility an implementation cornerstone Built-in files; other OS functionality in an extension Returned to standard programming terminology Underscore in identifiers; lowercase keywords List has ordering; dictionary is hash table Optimize for small strings (memcpy is very fast) Assignment: variable = expression Added exceptions, try/except, try/finally (Modula 3) Dropped the integrated editing environment Appealed to the Unix world: imitate /bin/sh behavior, # for comments, support #!, access most low-level Unix system calls (but also PC/Mac ports!)
June 27, 2005© 2005 Guido van Rossum 11 What Else I Changed Much of this was motivated by keeping it simple enough to be a one-person project! Dropped type inference; dynamic typing instead Dropped "refinement" control structures Separated int, long and float numeric types Biggest mistakes: –32-bit integers (premature optimization) –int/int truncating the value (mindlessly copied C) –class/type dichotomy (user-classes an afterthought) –string exceptions (exceptions came before classes!)
June 27, 2005© 2005 Guido van Rossum 12 The Zen of Python 1.Beautiful is better than ugly. 2.Explicit is better than implicit. 3.Simple is better than complex. 4.Complex is better than complicated. 5.Flat is better than nested. 6.Sparse is better than dense. 7.Readability counts. 8.Special cases aren't special enough to break the rules. 9.Although practicality beats purity. 10.Errors should never pass silently. 11.Unless explicitly silenced. 12.In the face of ambiguity, refuse the temptation to guess. 13.There should be one and preferably only one obvious way to do it. 14.Although that way may not be obvious at first unless you're Dutch. 15.Now is better than never. 16.Although never is often better than right now. 17.If the implementation is hard to explain, it's a bad idea. 18.If the implementation is easy to explain, it may be a good idea. 19.Namespaces are one honking great idea let's do more of those! (a poem by Tim Peters)
June 27, 2005© 2005 Guido van Rossum 13 Question Time
® ® Why Design Another Language? Python UK & ACCU Spring Conference Oxford - April 2, 2003 Guido van Rossum Director of PythonLabs at Zope Corporation.
Python Monty or Snake?. Monty? Spam, spam, spam and eggs Dead parrots Eric Idle, John Cleese, Michael Palin, etc.
Jonathan Huelman CSC 415 – Programming Languages
"The State of the Python Union" Python10 - Alexandria, VA - February 7, 2002 Guido van Rossum Director, PythonLabs at Zope Corporation
Modules and Decomposition UW CSE 190p Summer 2012 download examples from the calendar.
Introduction to Python (for C++ programmers). Background Information History – created in December 1989 by Guido van Rossum Interpreted Dynamically-typed.
Intro to Python Programming (Resources) Pamela A. Moore Zenia C. Bahorski Eastern Michigan University March 7, 2012 A language to swear by, not at. 1.
Modern Programming Languages, 2nd ed.
State of the Python Union PyCon DC, March 26-28, 2003 Guido van Rossum Director of PythonLabs at Zope Corporation
Addition 1’s to 20.
Chapter 4 Loops Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved
10/09/1999© 1999 CNRI, Guido van Rossum 1 Computer Programming for Everybody Guido van Rossum CNRI (Corporation for National Research Initiatives, Reston,
1 CSC 221: Introduction to Programming Fall 2012 Python data, assignments & turtles Scratch programming review Python & IDLE numbers & expressions.
1 Python Training for HP OSO Guido van Rossum CNRI 7/23/1999 9am - 1pm.
C463 / B551 Artificial Intelligence Dana Vrajitoru Python.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
Chapter 5: Control Structures II (Repetition)
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 3 Loops.
Computer Science 101 Introduction to Programming.
Chapter Three Arithmetic Expressions and Assignment Statements
Lilian Blot PART V: FUNCTIONS Core elements Autumn 2013 TPOP 1.
Accelerated Linear Algebra Libraries James Wynne III NCCS User Assistance.
CS1022 Computer Programming & Principles
8 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems
L6:CSC © Dr. Basheer M. Nasef Lecture #6 By Dr. Basheer M. Nasef.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 5.
Python Let’s get started!.
Chapter 5 Loops Liang, Introduction to Java Programming, Tenth Edition, (c) 2015 Pearson Education, Inc. All rights reserved.
1 CSC 221: Computer Programming I Fall 2006 interacting objects modular design: dot races constants, static fields cascading if-else, logical operators.
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Python By Steve Wright. What is Python? Simple, powerful, GP scripting language Simple, powerful, GP scripting language Object oriented Object oriented.
0 - 0.
Chapter 3 - Language Design Principles
Chapter 11 Introduction to Programming in C
1 of 32 Images from Africa. 2 of 32 My little Haitian friend Antoine (1985)
1 Data Link Protocols By Erik Reeber. 2 Goals Use SPIN to model-check successively more complex protocols Using the protocols in Tannenbaums 3 rd Edition.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 6: Variables and constants.
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
Compsci 06/101, Spring Compsci 6/101: PFTW, Feb 28-March 4 l Algorithms and Data Structures Sets and how they are used in Python (data structure)
1 The C Language An International Standard CIS2450 Professional Aspect of Software Engineering.
Cs205: engineering software university of virginia fall 2006 Specifying Procedures David Evans
CSci 1130 Intro to Programming in Java
PROBLEM SOLVING WARM-UP Fill in the spaces using any operation to solve the following (!, (), -/+,÷,×): = 6.
CSE 130 : Winter 2009 Programming Languages Lecture 11: What’s in a Name ?
Lecture 10 Flow of Control: Loops (Part 2) COMP1681 / SE15 Introduction to Programming.
1 Programming Languages (CS 550) Mini Language Interpreter Jeremy R. Johnson.
© 2017 SlidePlayer.com Inc. All rights reserved.