Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Pourquoi Python ?
Search
Boris Feld
November 28, 2011
Programming
220
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pourquoi Python ?
Keynote d'ouverture de l'évènement "Vous reprendrez bien un peu de Python" à la Cantine.
Boris Feld
November 28, 2011
More Decks by Boris Feld
See All by Boris Feld
BALTO, ONE TEST OUTPUT FORMAT TO UNITE THEM ALL
lothiraldan
0
78
Une révolution dans le monde des tests
lothiraldan
0
330
Mercurial changeset Evolution
lothiraldan
0
230
Python Unicode and Bytes Demystified
lothiraldan
0
300
Django 101
lothiraldan
0
290
Saltpad: A saltstack Web GUI
lothiraldan
5
28k
Mock considered harmful
lothiraldan
1
760
from Sync to Async Python, a AsyncIO migration
lothiraldan
2
790
Microservices késako
lothiraldan
0
180
Other Decks in Programming
See All in Programming
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
180
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.9k
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
560
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
440
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
500
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
220
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
280
The Rails Doctrine Decade
koic
2
410
Webの地図
yosuke_furukawa
PRO
6
4.9k
ゲームコントローラやキーボードのファームウェアをSwiftで書く
kishikawakatsumi
1
270
Agents on Rails - Rails at Scale 2026
irinanazarova
0
280
Security issues being discussed on Web Platforms
petamoriken
0
1.3k
Featured
See All Featured
How GitHub (no longer) Works
holman
316
150k
Being A Developer After 40
akosma
91
590k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Building AI with AI
inesmontani
PRO
1
1.3k
The Curse of the Amulet
leimatthew05
3
15k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
430
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Faster Mobile Websites
deanohume
310
32k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
950
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Transcript
Pourquoi Python ? FELD Boris - 28 novembre 2011 La
Cantine
Qui suis-je ? Étudiant en école d’ingénieur (UTBM) En stage
Assurance-Qualité chez Dailymotion Développe en Python depuis 2 ans Twitter: @lothiraldan
Python késako ? Créé en 1990 par Guido Von Rossum
Nommé en hommage aux Monty Python 8ème langage le plus populaire selon le Tiobe Index 13 versions majeures de nos jours
Caractéristiques Typage fort Typage dynamique Byte-compilé
Python est utilisé Disqus Eve Online Mozilla (addons.mozilla.org) Inkspace De
nombreux outils que vous utilisez tous les jours.
1) La rapidité
Hello World JAVA public class HelloWorld { public static void
main(String[] args) { System.out.println("Goodbye, World!"); } }
Hello World C #include <stdlib.h> #include <stdio.h> int main(void) {
printf("Goodbye, World!\n"); return EXIT_SUCCESS; }
Hello World Python print "Goodbye, World!"
Lancer les exemples JAVA : $> javac HelloWorld.java $> java
HelloWorld C : $> gcc hello_world.c -o hello_world $> ./hello_world Python : $> python hello_world.py
Simple... Langage concis Permet un développement rapide Multi-paradigme
...mais pas simpliste Fonctionnalités avancées: Décorateurs Générateurs Listes compréhensives Descripteurs
Les truc vraiment cool Pas de gestion « à la
main » de la mémoire Des structures de données faciles à utiliser Introspection avancée
2) La syntaxe
Les types de base an_int = 42 a_float = 3.14
a_list = [1, 2, 3] a_dict = {'key1': 'value1', 'key2': 'value3'} a_complex = complex(1, 2) #Ou complex('1+2j')
L’indentation compte /* Warning: confusing C code! */ if (some
condition) if (another condition) do_something(fancy); else this_sucks(badluck); # Warning: awesome python if some condition: if another condition: do_something(fancy) else: this_dont_sucks(goodluck)
Fonctions def fib(n): if n < 2: return n else:
return fib(n-1) + fib(n-2) fib(10)
Classes class Message(object): def __init__(self, message = ‘’): self.message =
message def print_message(self): print self.message m = Message("Message example") m.print_message()
Import import math math.sqrt(9)
Structure de données a_list = [] a_number = 5 a_list.append(a_number)
another_number = a_list[0]
Syntaxe Une syntaxe simple à écrire et à LIRE L’indentation
obligatoire rend le code clair à écrire et surtout à lire Pas de points-virgules ni d’accolades Très proche du pseudo-code
3) La librairie standard
Types de données Structures de données Dates Chaînes et les
chaînes en unicode Les ensembles (au sens mathématique) Nombres complexes
Formats de fichiers La librairie standard permet de lire et
écrire des fichiers dans ces formats: JSON INI CSV XML HTML
Réseau/Internet Socket BSD Serveur HTML/CGI simple Gérer/Parser des requêtes HTTP
SMTP Client/Serveur XML-RPC
Outils Débogueur Profiling Librairie de Test Unitaires
Autre Cryptographie Compression Regex Sérialisation Encore plus ? http:/ /docs.python.org/
library/
4) Intuitif
Python est intuitif En python tout est objet... On encourage
une seule façon de faire... Et cela permet d’acquérir rapidement des réflexes de programmation.
Un langage objet file.readline() file.read(size) " abc ".strip()
Parcours d’une structure de données Liste: for elem in [1,
2, 3] Dictionnaire: for key in {‘key1’: ‘val1’, ‘key2’: ‘val2’} Chaîne: for letter in ‘mystring’
Longueur d’une structure de donnée Liste: len([1, 2, 3]) Dictionnaire:
len({‘key1’: ‘value1’, ‘key2’: ‘value’}) Chaîne: len(‘mystring’)
Vérifier si une valeur est présente Liste: 4 in [1,
2, 3] Dictionnaire: ‘key3’ in {‘key1’: ‘val1’, ‘key2’: ‘val’} Chaîne: ‘x’ in ‘string’
5) Extensibilité
Interpréteurs CPython, l’interpréteur de référence Jython IronPython PYPY compilateur JIT
Extensibilité Problèmes de performances: Écrivez des modules en C Besoin
d’interfacer python: Avec Java, utilisez Jython Avec .NET, utilisez IronPython
Conclusion C’est un véritable plaisir de coder en Python Donnez
lui sa chance Python vous rendra de grands services même en tant que langage de script
Demo time ! Récupérer le dernier tweet