background preloader

Python

Facebook Twitter

Style Guide for Python Code. Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Cython, Psyco, and such).For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b.

Style Guide for Python Code

This optimization is fragile even in CPython (it only works for some types) and isn't present at all in implementations that don't use refcounting. In performance sensitive parts of the library, the ''.join() form should be used instead. This will ensure that concatenation occurs in linear time across various implementations.Comparisons to singletons like None should always be done with is or is not, never the equality operators.Also, beware of writing if x when you really mean if x is not None -- e.g. when testing whether a variable or argument that defaults to None was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context!

Domptage de serpents pour les enfants. A byte of Python - Table des Matières. Plongez au coeur de Python. Apprendre à programmer avec Python. Ressources Python. Ressources didactiques Gérard Swinnen Vous trouverez ci-dessous : en téléchargement libre, les versions numériques de l'ouvrage "Apprendre à programmer avec Python" de Gérard Swinnen (troisième et cinquième éditions), anciennement publié aux éditions O'Reilly et dorénavant édité chez Eyrolles (ISBN 978-2-212-13434-6) ; le code source des exemples et exercices proposés dans le livre ;Les diapositives et le code source des exemples présentés par G.Swinnen au colloque "Libr'East of Paris" (IUT de Marne-la-vallée) les 23 & 24 Avril 2004 ;Les diapositives de la conférence sur Python présentée à l'IUT de Vannes (Université de Bretagne Sud), le 15 Avril 2005 ;La traduction du livre en hongrois (+ lien vers le site web du traducteur).La traduction du livre en arabe (+ lien vers le site web des traducteurs).

Ressources Python

Les deux dernières éditions traitent de la version 3 de Python. Au sommaire : Préface. Pour le professeur qui souhaite un support de cours. *** Traduction hongroise *** *** Traduction arabe *** Think Python: How to Think Like a Computer Scientist. How to Think Like a Computer Scientist by Allen B.

Think Python: How to Think Like a Computer Scientist

Downey This is the first edition of Think Python, which uses Python 2. If you are using Python 3, you might want to use the second edition, which is here. Buy this book at Amazon.com Download Think Python in PDF. Read Think Python in HTML. Example programs and solutions to some problems are here (links to specific examples are in the book). Description Think Python is an introduction to Python programming for beginners. Some examples and exercises are based on Swampy, a Python package written by the author to demonstrate aspects of software design, and to give readers a chance to experiment with simple graphics and animation. Think Python is a Free Book. If you have comments, corrections or suggestions, please send me email at feedback{at}thinkpython{dot}com. Other Free Books by Allen Downey are available from Green Tea Press.

Download. Les meilleurs cours Python et Zope - Club des dév. Python (langage) Un article de Wikipédia, l'encyclopédie libre.

Python (langage)

Pour les articles homonymes, voir Python. Il est également apprécié par les pédagogues qui y trouvent un langage où la syntaxe, clairement séparée des mécanismes de bas niveau, permet une initiation aisée aux concepts de base de la programmation[3]. Python est un langage qui peut s'utiliser dans de nombreux contextes et s'adapter à tout type d'utilisation grâce à des bibliothèques spécialisées. Il est cependant particulièrement utilisé comme langage de script pour automatiser des tâches simples mais fastidieuses comme un script qui récupérerait la météo sur Internet ou qui s'intégrerait dans un logiciel de conception assistée par ordinateur afin d'automatiser certains enchaînements d'actions répétitives. On l'utilise également comme langage de développement de prototype lorsqu'on a besoin d'une application fonctionnelle avant de l'optimiser avec un langage de plus bas niveau.

Guido van Rossum, créateur de Python, à la OSCON 2006. Python Programming Language. Afpy — Association Francophone Python. Forums Python — Association Francophone Python. Python Bibliotheca. Python.