5. Cos'è Python
● Linguaggio di programmazione:
● Alto livello e General purpose
● Sintassi estremamente pulita
● Multiparadigma
● Tipazione dinamica
● Embeddable ed Estensibile
● Multipiattaforma
● Diverse implementazioni del linguaggio
6. Python per programmatori Java
● Linguaggio compilato in bytecode
● In Python compilazione implicita
● Tutto è un oggetto
● Libreria standard vasta e potente
● Garbage collection
● Introspezione
● Serializzazione
● Threads
7. Python per programmatori C++
● Multiparadigma
● Ereditarietà multipla
● Sovraccarico degli operatori
● Decine di librerie terze parti per applicazioni
GUI, rete, database, calcolo distribuito
8. Python per programmatori C
● Trust the programmer
● Don’t prevent the programmer from doing
what needs to be done.
● Keep the language small and simple.
● Provide only one way to do an operation.
● Make it fast, even if it is not guaranteed to
be portable. (oops... :-)
– Keep the spirit of C, C99 Rationale
9. Python per programmatori.
● Tipazione forte ma dinamica
● I nomi non hanno tipo, gli oggetti sì
● Niente dichiarazioni – solo istruzioni
● Sintassi minimale
● Indentazione definisce i blocchi
● Niente () se non strettamente necessario
● In generale, poca punteggiatura
● Tutto è un oggetto di prima classe
● Funzioni, classi, metodi, moduli
● Il focus è sull'alto livello
11. Popolarità
Non necessariamente un linguaggio popolare è anche buono,
ma un linguaggio buono deve essere popolare (P.Graham).
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
15. Fattori esterni
● Documentazione e libri
● Documentazione ufficiale esaustiva ed
aggiornata
● Mailing lists, gruppi di discussione, canali IRC
sia internazionali che localizzati
● Decine di Tutorials online
● Decine e decine di ottimi libri e manuali
sull'argomento
17. Fattori esterni
● Comunità
● Python Diversity
● Local User Groups
● Conferenze
● Open Source - Licenza PSFL
● Certificata OSI
● Certificata FSF
● BSD-like, molto liberale
18. Espressività
● add x to y giving z
● z=x+y
● print 'hello, world'
● print sum(x for x in range(1000) if x%3==0 or x % 5==0)
● The Zen of Python: readability counts.
● Executable pseudo-code
19. Hackability
● Clean
● Facile da usare
● Facile da imparare
● Facile da leggere
● Dirty
20. Programmi usa e getta
● Installato di default su tutte le distribuzioni
Linux e su Mac OSX
● Shell interattiva
26. Evoluzione agile
● Python Enhancement Proposal (PEP)
● Standard Track
– PEP100 – Unicode integration
– PEP202 – List comprehension
● Informational
– PEP8 – Style guidelines
– PEP20 – The Zen of Python
● Process
– PEP3000 – Python 3k
27. Python per tutti
● Ottimo come primo linguaggio
● Ragazzi
– Python 4 kids, Snake wrangling for kids, Invent With Python
● Adulti
– How to Think Like a Computer Scientist
– A Gentle Introduction to Programming Using Python (MIT)
● Nonnetti
– Artificial Intelligence: a modern approach, P.Norvig
● Ottimo come ultimo linguaggio
● Nel senso che non vorrete più cambiarlo