Be a Zen monk, the Python way.
A short tech talk at Imaginea to get developers bootstrapped with the focus and philosophy of Python and their point of convergence with the philosophy.
1 of 14
Download to read offline
More Related Content
Be a Zen monk, the Python way
1. Current state of adoption
Welcome when the focus is
Rapid prototyping
Machine learning, thanks to set libraries [numpy,
scipy, pandas]
Ease of boot up, thanks to Django's aping of Rails'
scaffold pattern*
* Should've gone the missing mile in spoiling a
new developer.
2. What the Python community likes to see?
Adoption of Python more for the generic nature
rather than a denigrated scripting language
approach.
Work closely with VM choices depending on
situations and improve on language
usability/performance itself. *
* STM with PyPy / Tulip with CPython are major
steps forward.
3. History
v 0.9.0 ~ February 1991
v 1.0.0 ~ January 1994
v 2.0 ~ October 2000
v 2.6 ~ October 2008 / v 3.0 ~ December 2008
v 2.7 ~ July 2010. Stopgap during Py3k migration
5. Focus
Evolved more as a general purpose programming
language borrowing upon features from time
tested yet aging dialects.
To quote the original snake charmer, Borrow
ideas from elsewhere whenever it makes sense.
And to paraphrase the Zen master, special
features to borrow aren't special enough if they
break philosophy.
8. Meta Zen
爐о爐爐鉦え => 爐爐鉦え => ch'an-na => 胼 [Zen]*
*Heinrich_Dumoulin
Meditate on amidst your madness
9. Idiosyncrasies
Quixotic combination of Dynamic and Strong
typing paradigms.
A strong type system bound to objects rather than
variables unlike neighbors.
GC outside scoping paradigms depending on
object reference counts.
Truth-y/False-y value checks like Javascript
(though empty arrays are truth-y out there)
towards the other end from Haskell.
10. Idiosyncrasies
Mutable default arguments
def appender(array=[]):
'''Appends a new integer 1 to an array'''
array.append(1)
print array
>>> for x in xrange(1, 3):
appender()
[1]
[1, 1]
>>>
11. Idiosyncrasies
Typing
>>> a = 1
>>> a = Now I am a string
Paraphrasing ratnakIrti, It was referring to an
integer and now refers to a string *
* yat sat tat kShaNikam | yathA ghaTaH
12. Learnings
Generators
TCO *
Native asynchronous operations ~ #3156 ~ Tulip
concurrent ~ Future objects
* debatable. Or not, given BDFL's justification.
[More @ PEP list]
13. Testing
Selenium.
While not a big fan of it,
Lettuce for BDD :: Cucumber [Ruby] :: Jasmine [JS]
RSpec replacement ~ Thorn in the fesh.
Anonymous function qualms with lambda.
Sure/nose-of-yeti solve the problem, but a long
way to go.