A brief introduction on Python.
This talk was presented at the meeting of the Beijing Software Craftsmanship Group on 2013/02/28.
http://www.meetup.com/BeijingSoftwareCraftsmanship/events/103481622
Please refer to the code demo'ed live:
https://github.com/rhcarvalho/talks/tree/master/2013/02-28%20Python%20in%2015%20minutes/code
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Python in 15 minutes
1. Python in 15 minutes
Rodolfo Henrique Carvalho
郝多福
中国北京,2013年2月28日
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 1/8
2. About me and you
Pythonista since 2006
Wrote from small scripts to bigger systems with tons of users and tens
of developers
Web programming (Turbogears, Django, Bottle, ...)
Founder of the Coding Dojo Rio group in Brazil (2008)
XMPPVOX (2012)
Crawlers, parsers, and several other kinds of programs...
Concurrent/parallel programs (multiprocessing, threads, greenlets, ...)
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 2/8
3. About Python
From the official website:
Python is a remarkably powerful dynamic programming
language that is used in a wide variety of application domains.
Python is often compared to Tcl, Perl, Ruby, Scheme or Java.
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 3/8
4. Features
clear syntax
introspection
multiparadigm (OO, procedural, functional, ...)
very high level dynamic data types (lists, sets, maps, ...)
“batteries included” + 3rd party modules for virtually every task
extensions and modules in C, C++ (or Java for Jython, or .NET
languages for IronPython)
embeddable within applications as a scripting interface (e.g.: games)
extensive unittest support
docstrings
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 4/8
5. >>> import this (The Zen of Python)
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren’t special enough to break the rules.
Although practicality beats purity.
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 5/8
6. >>> import this (The Zen of Python)
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one – and preferably only one – obvious way to do it.
Although that way may not be obvious at first unless you’re Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it’s a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea – let’s do more of those!
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 6/8
7. How does it look like?
Let’s see some code
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 7/8
8. Learn more
http://docs.python.org/2/tutorial/
网页: about.me/rhcarvalho
Need in-company Python trainning? Drop me a line.
Rodolfo 郝多福 Python in 15 minutes 2013-02-28 8/8