INFO-H-302 Introduction Pythoncs.ulb.ac.be/public/_media/teaching/infoh302/infoh302_python.pdf ·...

29
INFO-H-302 Introduction Python Analyse et Conception par Objets

Transcript of INFO-H-302 Introduction Pythoncs.ulb.ac.be/public/_media/teaching/infoh302/infoh302_python.pdf ·...

INFO-H-302Introduction Python

Analyse et Conception par Objets

Pourquoi apprendre Python ?

Pourquoi apprendre un nouveau langage ?

• ... pourquoi pas ?

• "Controlling complexity is the essence of computer programming."(Brian Kernighan)

• Autre langage, autre approche de la complexité

1986 1990 1990 1991 1991 1993 1994 1995 1996 1996 1997 1997 2000 2001 2001 2003 2003 2004

History of Programming Languages

©2004 O’Reilly Media, Inc. O’Reilly logo is a registered trademark of O’Reilly Media, Inc. All other trademarks are property of their respective owners. part#30417

19601954 1965 1970 1975 1980 1985 1990 1995 2000 20022001 2003 2004

For more than half of the fifty years computer programmers have beenwriting code, O’Reilly has provided developers with comprehensive,in-depth technical information. We’ve kept pace with rapidly changingtechnologies as new languages have emerged, developed, andmatured. Whether you want to learn something new or needanswers to tough technical questions, you’ll find what you need in O’Reilly books and on the O’Reilly Network.

This timeline includes fifty of the more than 2500 documented programming languages. It is based on an original diagram createdby Éric Lévénez (www.levenez.com), augmented with suggestionsfrom O’Reilly authors, friends, and conference attendees.

For information and discussion on this poster, go to www.oreilly.com/go/languageposter.

www.oreilly.com

19

56

19

58

19

60

19

62

19

64

19

66

19

68

19

70

19

72

19

74

19

76

19

78

19

80

19

82

19

84

19

86

19

88

19

90

19

92

19

94

19

96

19

98

20

00

20

02

20

04

20

06

20

08

Sm

allt

alk

80

Ruby

C# 2

.0

SM

L

Cam

l

OC

am

l

Perl

Perl 5

Java 2

(v1.5

beta

)

Fort

ran I

PL/I

Alg

ol 60

Fort

ran 7

7

Schem

e

Com

mon L

isp

Schem

e R

5R

S

Pascal Fort

ran 9

0

Pro

log

Pyth

on

Pyth

on 2

.0

Sm

allt

alk

C (

K&

R)

Tcl

C+

+

CO

BO

L

C#

Lis

p

Java

JavaS

cript

C+

+ (

ISO

)H

askell

98

Ada 8

3

Eiffe

l

ML

19

56

19

58

19

60

19

62

19

64

19

66

19

68

19

70

19

72

19

74

19

76

19

78

19

80

19

82

19

84

19

86

19

88

19

90

19

92

19

94

19

96

19

98

20

00

20

02

20

04

20

06

20

08

Sm

allt

alk

80

Ruby

C# 2

.0

SM

L

Cam

l

OC

am

l

Perl

Perl 5

Java 2

(v1.5

beta

)

Fort

ran I

PL/I

Alg

ol 60

Fort

ran 7

7

Schem

e

Com

mon L

isp

Schem

e R

5R

S

Pascal Fort

ran 9

0

Pro

log

Pyth

on

Pyth

on 2

.0

Sm

allt

alk

C (

K&

R)

Tcl

C+

+

CO

BO

L

C#

Lis

p

Java

JavaS

cript

C+

+ (

ISO

)H

askell

98

Ada 8

3

Eiffe

l

ML

19

56

19

58

19

60

19

62

19

64

19

66

19

68

19

70

19

72

19

74

19

76

19

78

19

80

19

82

19

84

19

86

19

88

19

90

19

92

19

94

19

96

19

98

20

00

20

02

20

04

20

06

20

08

Sm

allt

alk

80

Ruby

C# 2

.0

SM

L

Cam

l

OC

am

l

Perl

Perl 5

Java 2

(v1.5

beta

)

Fort

ran I

PL/I

Alg

ol 60

Fort

ran 7

7

Schem

e

Com

mon L

isp

Schem

e R

5R

S

Pascal Fort

ran 9

0

Pro

log

Pyth

on

Pyth

on 2

.0

Sm

allt

alk

C (

K&

R)

Tcl

C+

+

CO

BO

L

C#

Lis

p

Java

JavaS

cript

C+

+ (

ISO

)H

askell

98

Ada 8

3

Eiffe

l

ML

Pourquoi apprendre Python ?

• Suffisamment proche de Java pour être facile

• Suffisamment différent pour être intéressant

• Très utilisé :

• Développement web

• Recherche en Mathématiques, Bioinformatique

• Administration système

Python

• Interprété

• Orienté-Objet

• Strong typing

• Dynamic typing

Interprété

Interprété

Interprété

Typage dynamique

Typage fort

“Duck-Typing”

• “If it quacks like a duck and flies like a duck... it must be a duck”

“Duck-Typing”

• “If it quacks like a duck and flies like a duck... it must be a duck”

Orienté-Objet

Types de données

Contrôle de flux

Contrôle de flux

Contrôle de flux

Fonctions

Iterator

Iterator

Fonctions, lambdas

Fonctions, lambdas

Plus d’information

• http://www.python.org

• http://docs.python.org/tut/

• http://www.python.org/download/