Python Interviews Discussions with Python Experts by Mike Driscoll (z-lib.org)

До загрузки: 30 сек.



Благодарим, что скачиваете у нас :)

Если, что - то:

  • Поделится ссылкой:
  • Документ найден в свободном доступе.
  • Загрузка документа - бесплатна.
  • Если нарушены ваши права, свяжитесь с нами.
Формат: pdf
Найдено: 23.09.2020
Добавлено: 30.09.2020
Размер: 1.99 Мб

T a b le o f C onte n ts
P yth on In te rv ie w s
Why s u bscrib e?
PacktP ub.c o m
F ore w ord
C ontr ib uto r
About th e A uth or
Packt is S earc h in g fo r A uth ors L ik e Y ou
P re fa ce
1 . B re tt C annon
2 . S te ve H old en
3 . C aro l W illin g
4 . G ly p h L efk o w it z
5 . D oug H ellm ann
6 . M assim o D i P ie rro
7 . A le x M arte lli
8 . M arc -A ndré L em burg
9 . B arry W ars a w
1 0. J e ssic a M cK ella r
1 1 . T a re k Z ia dé
1 2. S ebastia n R asch ka
1 3. W esle y C hun
1 4. S te ve n L ott
1 5. O liv e r S ch oenborn
1 6. A l S w eig art
1 7. L ucia no R am alh o
1 8. N ic k C oghla n
1 9. M ik e B aye r
2 0. J a ke V anderp la s
O th er B ooks Y ou M ay E njo y
Artif ic ia l In te llig ence w it h P yth on
Unders ta ndin g S oftw are
Leave a r e vie w - le t o th er r e aders k n ow w hat y o u th in k

P yth on In te rv ie w s

P yth on In te rv ie w s
C opyrig ht © 2 018 P ackt P ublis h in g
A ll rig hts re se rv e d. N o p art o f th is b ook m ay b e re pro duce d, s to re d in a
r e tr ie va l
syste m , o r tr a nsm it te d in a ny fo rm o r b y a ny m eans, w it h out th e
p rio r w rit te n perm is sio n
of th e publis h er, exce pt in th e ca se of brie f
q uota tio ns e m bedded in c rit ic a l a rtic le s
or r e vie w s.
E ve ry e ff o rt h as b een m ade in th e p re para tio n o f th is b ook to e nsu re th e
a ccu ra cy
of th e in fo rm atio n pre se nte d. How eve r, th e in fo rm atio n
c o nta in ed in th is b ook is s o ld
wit h out w arra nty , e it h er e xp re ss o r im plie d.
N eit h er th e a uth or, n or P ackt P ublis h in g
or it s d eale rs a nd d is tr ib uto rs ,
w ill b e h eld lia ble fo r a ny d am ages ca use d o r a lle ged
to h ave b een
c a use d d ir e ctly o r in dir e ctly b y th is b ook.
P ackt P ublis h in g h as e ndeavo re d to p ro vid e tr a dem ark in fo rm atio n a bout
a ll of th e
co m panie s and pro ducts m entio ned in th is book by th e
a ppro pria te u se o f c a pit a ls .
How eve r, P ackt P ublis h in g c a nnot g uara nte e
t h e a ccu ra cy o f th is in fo rm atio n.
A cq uis it io n E dit o r:
B en R enow -C la rk e
P ro je ct E dit o r:
R adhik a A tit k a r
C onte n t D evelo pm en t E dit o rs :
J o anne L ove ll
T e ch nic al E dit o r:
G aura v G ava s
C opy E dit o r:
J o anne L ove ll
I n dexer:
T e ja l D aru w ale S oni
G ra p hic s:
T o m S ca ria
P ro ductio n C oord in ato r:
A rv in dku m ar G upta
F ir s t p ublis h ed: F ebru ary 2 018

Pro ductio n r e fe re nce : 1 270218
Publis h ed b y P ackt P ublis h in g L td .
Liv e ry P la ce
35 L iv e ry S tr e et
Bir m in gham B 3 2 P B, U K.
IS BN 9 78-1 -7 8839-9 08-1
www.p acktp ub.c o m
"P yth on" a nd th e P yth on L ogo a re tr a dem ark s o f th e P yth on S oftw are
Foundatio n.
mapt.io
Mapt is a n o nlin e d ig it a l lib ra ry th at g iv e s y o u fu ll a cce ss to o ve r 5 ,0 00
books a nd
vid eos, a s w ell a s in dustr y le adin g to ols to h elp y o u p la n y o ur
pers o nal d eve lo pm ent
and a dva nce y o ur c a re er. F or m ore in fo rm atio n,
ple ase v is it o ur w ebsit e .
Why s u bscrib e?
Spend le ss tim e le arn in g a nd m ore tim e c o din g w it h p ra ctic a l e B ooks
and V id eos fr o m
ove r 4 ,0 00 in dustr y p ro fe ssio nals
Learn b ette r w it h S kill P la ns b uilt e sp ecia lly fo r y o u
Get a fr e e e B ook o r v id eo e ve ry m onth
Mapt is fu lly s e arc h able
Copy a nd p aste , p rin t, a nd b ookm ark c o nte nt

P acktP ub.c o m
D id y o u k n ow th at P ackt o ff e rs e B ook v e rs io ns o f e ve ry b ook p ublis h ed,
w it h P D F and
eP ub file s ava ila ble ? You ca n upgra de to th e eB ook
v e rs io n a t
www.P acktP ub.c o m
a nd a s a p rin t b ook c u sto m er, y o u a re
e ntit le d to a dis co unt on th e eB ook co py. G et
in to uch wit h us
a t
< service@packtpub.com
> fo r m ore d eta ils .
A t
www.P acktP ub.c o m
, y o u c a n a ls o re ad a c o lle ctio n o f fr e e te ch nic a l
a rtic le s, s ig n u p fo r a ra nge o f
fr e e n ew sle tte rs , a nd re ce iv e e xclu siv e
d is co unts a nd o ff e rs o n P ackt b ooks a nd e B ooks.

F ore w ord
W elc o m e, a ll, to
Pyth on In te rv ie w s
!
P eople o fte n g et c o nfu se d a bout o pen s o urc e p ro gra m min g la nguages,
f o cu sin g m ere ly
on th e te ch nolo gy b ehin d th e la nguage — b e it th e
l a nguage it s e lf , th e lib ra rie s a va ila ble
fo r it , o r th e im pre ssiv e p ro d ucts
t h at a re b uilt w it h it — a nd n ot o n th e e co syste m
of in div id uals th at a re
r e sp onsib le fo r th e la nguage e xis tin g in th e fir s t p la ce .
P yth on is a n o pen s o urc e la nguage, d riv e n m ostly b y v o lu nte er e ff o rts
f r o m all aro und
th e glo be. It's im porta nt to fo cu s not only on th e
t e ch nolo gy b ehin d w hat m ake s P yth on
gre at, b ut a ls o th e in div id uals th at
m ake it g re at a s w ell.
T he w orld o f P yth on is n ot o ne co m pris e d m ere ly o f co de, b ut o f a
c o m munit y o f lik e -m in ded
in div id uals c o m in g to geth er to m ake th e w orld
a b ette r p la ce th ro ugh th e o pen s o urc e
eth os. T housa nds o f in div id u als
h ave c o ntr ib ute d to w ard s th e s u cce ss o f P yth on.
T his book co nta in s in te rv ie w s wit h an exce lle nt se le ctio n of th e
i n div id uals th at
pow er P yth on a nd it s w onderfu l o pen s o urc e c o m munit y .
I t div e s in to th e pers o nal backg ro unds
of th ese in div id uals and th e
o pin io ns th ey have about th e co m munit y , th e te ch nolo gy,
and th e
d ir e ctio n w e'r e h eaded in , to geth er.
B ut, m ust im porta ntly — it exp ose s th at Pyth on, th e pro gra m in g
l a nguage, is in deed
co m pris e d o f p ers o ns, ju st lik e y o u, tr y in g to m ake a
d if f e re nce in th e w orld , o ne
ste p a t a tim e.
K en neth R eit z
D ir e cto r a t L arg e fo r th e P yth on S oftw are F oundatio n

C ontr ib uto r
A bout t h e A uth or
M ik e D ris co ll
h as b een u sin g P yth on s in ce A pril 2 006. H e b lo gs fo r th e
P yth on S oftw are F oundatio n.
Oth er th an b lo ggin g, h e e njo ys re adin g
n ove ls , lis te nin g to a w id e v a rie ty o f m usic ,
and le arn in g p hoto gra phy. H e
w rit e s d ocu m enta tio n fo r th e w xP yth on p ro je ct's w ik i
page a nd h elp s
w xP yth on u se rs o n th eir m ailin g lis t. H e a ls o h elp s P yth on u se rs o n
th e
P yW in 32 lis t a nd o cca sio nally th e c o m p.la ng.p y lis t to o.

P ackt is Searc h in g fo r A uth ors
L ik e Y o u
I f yo u'r e in te re ste d in beco m in g an auth or fo r Packt, ple ase
v is it
auth ors .p acktp ub.c o m
and apply to day. W e have w ork e d w it h
t h ousa nds o f d eve lo pers a nd te ch p ro fe ssio nals ,
ju st lik e y o u, to h elp
t h em s h are th eir in sig ht w it h th e g lo bal te ch c o m munit y . Y ou
ca n m ake a
g enera l a pplic a tio n, a pply fo r a s p ecif ic h ot to pic th at w e a re r e cru it in g
an
a uth or fo r, o r s u bm it y o ur o w n id ea.

P re fa ce
N ear th e e nd o f 2 016, I w as b ra in sto rm in g w it h m y e dit o r a bout th e k in ds
o f b ooks
mig ht b e o f in te re st. I h ad b een d oin g a s e rie s o f a rtic le s o n m y
b lo g c a lle d
PyD ev o f th e W eek
th at in sp ir e d u s in to c ra ftin g a b ook b ase d
o n in te rv ie w in g c o re m em bers o f th e P yth on
co m munit y . I s p ent s o m e
t im e h ash in g o ut 2 0 n am es o f p eople th at I th ought w ould b e
good fo r th e
b ook a nd th en I s ta rte d c o nta ctin g th em in 2 017.
O ve r th e c o urs e o f a bout 8 -1 2 m onth s, I e nded u p in te rv ie w in g 2 0 p illa rs
o f th e P yth on
co m munit y , a lt h ough m y lis t c h anged s e ve ra l tim es o ve r
t h at p erio d. S om e p eople w ere n't
ava ila ble o r c o uld n't b e re ach ed. B ut I
p ers e ve re d and m anaged to pull to geth er a
well- ro unded se t of
r e pre se nta tiv e s o f th e P yth on p ro gra m min g c o m munit y .
I n th is book, yo u w ill get in te re stin g anecd ote s about th e his to ry of
P yth on a nd it s
cre ato rs , s u ch a s B re tt C annon a nd N ic k C oghla n. Y ou w ill
d is co ve r w hy P yth on d id n't
have U nic o de s u pport in it s fir s t re le ase , a nd
y o u'l l h ear fr o m c o re d eve lo pers a bout
where th ey th in k P yth on is g oin g
i n th e fu tu re . Y ou w ill a ls o h ear fr o m s o m e w ell- k n ow n
Pyth on a uth ors ,
l ik e A l S w eig art, L ucia no R am alh o, a nd D oug H ellm an.
I a ls o s p oke w it h s o m e o f th e c re ato rs o r c o re d eve lo pers o f p opula r
t h ir d -p arty p acka ges
in P yth on, s u ch a s w eb2py (M assim o D i P ie rro ),
S Q LA lc h em y (M ik e Baye r), and th e Tw is te d
Fra m ew ork (G ly p h
L efk o w it z ), a m ong o th ers .
M y in te rv ie w w it h C aro l W illin g w as a lo t o f fu n. S he is a ls o a co re
d eve lo per o f
th e P yth on la nguage it s e lf , s o le arn in g h er v ie w s o n w om en
i n te ch nolo gy and Pyth on
was quit e enlig hte nin g. She is als o a
c o ntr ib uto r to P ro je ct J u pyte r, s o le arn in g
more a bout th at p ro je ct w as
e xcit in g.
I th in k y o u w il l fin d A le x M arte lli a nd S te ve H old en's in te rv ie w s to b e
e sp ecia lly
co m pellin g a s th ey h ave b een w ork in g w it h P yth on fo r a v e ry
l o ng tim e a nd h ave m any
in te re stin g in sig hts .
T here is a lo t to le arn fr o m a ll th e in div id uals th at I s p oke w it h . If y o u

happen
to k n ow th em , y o u k n ow th at e ve n b ette r th an I d o. A ll o f th em
were g re at to c h at
wit h a nd v e ry r e sp onsiv e to m e e ve n o n th e s h orte st o f
tim elin es. If y o u h appen to
meet th em a t a c o nfe re nce , b e s u re to th ank
th em fo r th eir c o ntr ib utio ns.
Specia l th anks g o o ut to a ll th e p eople I in te rv ie w ed. T hey to ok tim e o ut
of th eir
liv e s to h elp m e w it h th is p ro je ct a nd I tr u ly a ppre cia te it . I a ls o
want to th ank
my e dit o rs fo r k e epin g th is p ro je ct o n tr a ck. F in ally , I w ould
lik e to th ank m y w if e ,
Eva ngelin e, fo r p uttin g u p w it h m e in te rv ie w in g
people a t ra ndom tim es th ro ughout
th e s u m mer. A nd fin ally , I w ant to
th ank y o u, d ear r e ader, fo r c h eckin g o ut th is b ook.

C hap te r 1 . B re tt C an non
B re tt Cannon
is a Canadia n so ftw are engin eer and Pyth on co re
d eve lo per. H e is a p rin cip al s o ftw are
deve lo per a t M ic ro so ft, w here h e
w ork s on edit in g to ols . P re vio us ro le s in clu de so ftw are
engin eer at
G oogle and cre ato r at O plo p. B re tt beca m e a fe llo w of th e P yth on
S oftw are
Foundatio n (P SF) in 2 003 a nd s e rv e d a s a d ir e cto r o f th e P SF
b etw een 2 013 a nd 2 014.
He is a fo rm er P yC on U S c o m mit te e m em ber
a nd w as c o nfe re nce c h air o f P yD ata S eattle
2017. B re tt le d th e m ig ra tio n
o f C Pyth on to G it H ub a nd c re ate d
importlib
. A m ong h is o pen s o urc e
a ch ie ve m ents is
ca niu se pyth on3
a nd h e is th e c o -a uth or o f
17 s u cce ssfu l
P yth on E nhance m ent P ro posa ls
.
Dis cu ssio n t h em es: c o re d evelo pers , v 2.7 /v 3.x , P yth on s p rin ts .
Catc h u p w it h B re tt C an non h ere : @ bre tts ky
M ik e D ris co ll
: W hy
d id y o u b eco m e a c o m pute r p ro gra m mer?
B re tt C an non
: I a lw ays fo und c o m pute rs in te re stin g, a s fa r b ack a s I c a n
r e m em ber. I w as lu cky
enough to g o to a n e le m enta ry sch ool w it h a
c o m pute r la b fu ll o f A pple IIe s, b ack
when th at w as th e c u ttin g e dge, s o I
w as e xp ose d to th em r e la tiv e ly e arly o n.
I n th e y e ar b etw een ju nio r h ig h a nd h ig h s ch ool, I to ok a c o m pute r c la ss

ove r th e
su m mer a nd th at in clu ded a lit tle b it o f A pple B ASIC . I d id it a nd
I e xce lle d a t it ,
to th e p oin t th at I th in k I fin is h ed th e e ntir e c la ss in th e fir s t
week. It h adn't
re ally c lic ke d th at I c o uld d o th at fo r a jo b a t th at p oin t.
This
c o ntin ued th ro ugh h ig h s ch ool, a nd th en w hen it c a m e tim e to p ic k
co urs e s fo r ju nio r
co lle ge, m y m om h ad m e p ro m is e h er tw o th in gs. I
agre ed th at I w ould ta ke a co urs e
in p hilo so phy a nd I w ould ta ke a
co urs e in c o m pute r p ro gra m min g. S o th at's w hat I
did a nd I lo ve d b oth .
Once a gain , I re ad m y in tr o ducto ry C b ook in th e fir s t tw o w eeks, w hic h
was s u ppose d
to la st fo r th e w hole s e m este r. I re m em ber th e fir s t tim e I
fin is h ed it , I s a t d ow n
and im ple m ente d tic -ta c-to e o ne d ay a fte r c la ss. I
eve n fo rg ot to e at d in ner! It w as
ju st o ne o f th ose e ure ka m om ents . T he
fe elin g o f b oundle ss c re ativ it y th at th is to ol
pro vid ed ju st e ngulf e d m e.
That's h ow I g ot in to p ro gra m min g.
Bre tt C an non: 'T he f e elin g o f b oundle ss c re ativ it y t h at t h is t o ol
pro vid ed ju st e n gulf e d
me. T hat's h ow I g ot in to p ro gra m min g.'
I k n ew th at tic -ta c-to e w as a s o lv e d p ro ble m , s o I th ought th at I c o uld
actu ally w rit e
th e lo gic so th at I co uld p la y tic -ta c-to e p erfe ctly a s a
pro gra m . I s p ent s o m eth in g
lik e s ix h ours o ne e ve nin g d oin g it , a nd I w as
utte rly b lo w n a w ay th at I w as a ctu ally
able to d o th at. It o pened u p th e
possib ilit ie s o f w hat c o m pute rs c o uld d o, a nd th e
fr e edom o f it a nd th e
abilit y to th in k a bout th e p ro ble m s ju st r e ally g ra bbed m e.
I'v e b een d oin g
it e ve r s in ce .
Dris co ll
: W hat le d yo u to b eco m in g so in vo lv e d
wit h P yth on a nd it s
co m munit y ?
Can non
: W ell, I e nde d u p g oin g to B erk e le y a nd g ettin g a d egre e in
philo so phy, b ut I k e pt
ta kin g c o m pute r s cie nce c o urs e s. T he in tr o ducto ry
co m pute r s cie nce c o urs e a t B erk e le y
had a n e ntr a nce e xa m , a nd I w as
worrie d th at I d id n't k n ow o bje ct- o rie nte d p ro gra m min g,
sin ce I o nly k n ew
C. S o I lo oke d a ro und fo r a n o bje ct- o rie nte d p ro gra m min g la nguage.
I
fo und P yth on, le arn ed it , lo ve d it , a nd k e pt w rit in g p ers o nal p ro gra m s in
it .

At s o m e p oin t a lo ng th e w ay, I n eeded
time.strptime
, th e fu nctio n to ta ke
a s tr in g th at re pre se nts a
datetime
a nd p ars e it b ack in to a tim e tu ple . I
was o n W in dow s a t th e tim e, a nd
time.strptime
w asn 't a va ila ble o n
Win dow s. A s a r e su lt , I c a m e u p w it h a w ay to p ars e it w here
yo u h ad to
still p lu g in th e lo ca le in fo rm atio n b ut it w ould s till p ars e it .
Back th en, A ctiv e S ta te 's c o o kb ook s it e w as s till a th in g, s o I p oste d m y
re cip e o f
how to d o
strptime
u p o n A ctiv e S ta te . L ate r, O 'R eilly p ublis h ed
th e fir s t e dit io n o f
Pyth on C ookb ook
, and A le x M arte lli in clu ded th at
re cip e a s th e la st re cip e in th e b ook, w hic h a ls o
happened to b e th e
lo ngest r e cip e in th e b ook.
Bre tt C an non: 'S o I p oste d m y r e cip e o f h ow t o d o s tr p tim e u p o n
Activ eS ta te .'
It still tic ke d m e off , th ough, th at people had to in put th eir lo ca le
in fo rm atio n.
I w as fr u str a te d th at I c o uld n't s o lv e th at. S o in th e b ack o f
my m in d, I w as c o ntin uously
th in kin g a bout h ow I
co uld g et th at lo ca le
in fo rm atio n o ut. E ve ntu ally , I so lv e d it . It w as a ctu ally th e
week a fte r
gra duatin g fr o m B erk e le y, a nd I g if te d
myse lf th e tim e to w rit e u p th e
so lu tio n, s o th at y o u d id n't h ave to e nte r lo ca le
in fo rm atio n a nym ore .
Afte r I d id th at, I e m aile d A le x M arte lli, s in ce
we'd e xch anged e m ails a
co uple o f tim es a t th at p oin t, a nd I s a id , "H ey, I'v e fix e d
th is s o it 's n ot
nece ssa ry to in put th e lo ca le a nym ore . H ow d o I g et th is u pstr e am ?"
Ale x
Marte lli s a id , "O h, w ell y o u ju st e m ail th is m ailin g lis t, P yth on-D ev, a nd
yo u
ca n s u bm it th e p atc h ."
Bre tt C an non: 'A le x M arte lli s aid , " O h, w ell y o u ju st e m ail t h is
mailin g lis t, P yth on-D ev,
an d y o u c an s u bm it t h e p atc h ." '
So, I e m aile d th e lis t a nd I th in k S kip M onta naro
w as th e fir s t p ers o n to
re sp ond. S kip ju st s a id , "Y eah, th at's g re at, ju st u plo ad
th e file a nd w e'l l
work a t it a nd a cce pt it ." I th ought th at w as a w eso m e. I w as a ble
to
co ntr ib ute to th is p ro je ct a nd th is la nguage, w hic h I th ought w as re ally
in te re stin g.

Bre tt C an non: 'I w as a b le t o c o ntr ib ute t o t h is p ro je ct a n d t h is
la n guag e, w hic h I
th ought w as r e ally in te re stin g.'
All of th is happened durin g a gap ye ar I was ta kin g betw een
underg ra duate a nd g ra duate
sch ool. I w as tr y in g to g et in to g ra duate
sch ool fo r c o m pute r s cie nce a nd I k n ew th at
I w as g oin g to n eed s o m e
more pro gra m min g exp erie nce , beyo nd th e co urs e s I w as ta kin g.
I
th ought th at I c o uld c o ntr ib ute to P yth on a nd h elp o ut. I h ad a ll th e tim e in
th e
world b ack th en, s o I d ecid ed I'd g et in vo lv e d.
Bre tt C an non: 'I d ecid ed I'd g et in vo lv ed .'
I g ot o n th e m ailin g lis t a nd I lu rk e d a ro und a skin g q uestio ns. T hen in th at
sa m e
ye ar, I o ff e re d to s ta rt ta kin g u p th e P yth on-D ev s u m marie s, w hic h
had s to pped a t
th at p oin t. O nce a gain , I fig ure d I h ad th e tim e to d o it ,
and I r e aliz e d it w as a
good w ay fo r m e to le arn , b eca use it fo rc e d m e to
re ad e ve ry s in gle s o lit a ry e m ail
in P yth on-D ev.
One in te re stin g s id e e ff e ct w as th at I g ot to k n ow a bout a ny s m all is su es
th at n obody
had tim e to ta ke c a re o f, s o I s a w a nyth in g th at c ro pped u p
befo re a lm ost a nyb ody
els e . I w as a ble to ve ry e asily p ic k u p sm all
is su es to fix a nd le arn , a nd I w as a ble
to c o ntin ually d o th at.
In th e g uis e o f th e P yth on-D ev s u m marie s, I g ot to a sk m ore a nd m ore
questio ns.
At s o m e p oin t, I k n ew e nough, a nd I b eca m e a c o re d eve lo per r ig ht a fte r
th e fir s t
PyC on (a t le ast th e fir s t c o nfe re nce la bele d P yC on), in 2 003. A t
th at p oin t I w as
hooke d. I'd g ot to k n ow th e te am a nd th e p eople h ad
beco m e fr ie nds o f m in e. I ju st
enjo ye d it s o m uch a nd it w as fu n, s o I
stu ck w it h it a nd I'v e n eve r r e ally s to pped
fo r lo nger th an a m onth s in ce .
http s://w ik i.p yth on.o rg /m oin /G etIn vo lv ed
That d oesn 't m ean th at y o u h ave to b e a c o re d eve lo per to g et in to th e

Pyth on c o m munit y .
As lo ng y o u e njo y it , y o u c a n g et h ooke d h ow eve r it
make s s e nse to y o u.
Dris co ll
: W hat th en m ade y o u d ecid e to s ta rt b lo ggin g a nd w rit in g a bout
Pyth on?
Can non
: B lo ggin g
is o ne o f th ose w ays to g et in vo lv e d a nd s in ce I e njo y
writ in g, th at m ediu m h appened
to fit th e w ay th at I lik e to c o m munic a te . I
sta rte d d oin g it w ay b ack w hen, a nd I'v e
more o r le ss c o nsis te ntly d one it
eve r s in ce . I a lw ays e njo y th at a sp ect o f d is p ensin g
kn ow le dge to th e
world a s b est a s I c a n.
Dris co ll
: W as it im porta nt th at y o u g ot in to P yth on a t ju st th e rig ht tim e?
Do y o u r e co m mend
gettin g in e arly o n p ro je cts ?
Can non
: Y es, it w as o ne o f th ose s it u atio ns w here I w as in th e r ig ht p la ce
at th e r ig ht
tim e, a nd w it h th e fr e e tim e I n eeded to g et g oin g. I m anaged
to s ta rt w hen I h ad
enough tim e to c o ntr ib ute a s m uch a s I w ante d.
I a ls o g ot s ta rte d w hen th e P yth on p ro je ct w asn 't th at b ig . I re m em ber
when I s ta rte d
my m aste r's d egre e, p eople w ould a sk w hat I d id in m y
sp are tim e. W hen I s a id I c o ntr ib ute d
to P yth on, th ey'd re ply , " Is th at th e
la nguage w it h th e w hit e s p ace ?" S o I'v e ju st
been d oin g th is fo r a lo ng
tim e.
So y e s, I g ot in vo lv e d in th e p ro je ct a t a n id eal p oin t, b efo re in te re st in th e
la nguage
su rg ed a ro und 2 005. I s o m etim es w is h th at I'd b een a ble to g et
sta rte d w it h it e arlie r
so m ehow , b ut I'd h ave b een y o unger, s o th at m ig ht
not h ave w ork e d. S o it w as s e re ndip it o us
th at it a ll ju st c a m e to geth er
when it d id .
Dris co ll
: W hat p arts o f P yth on h ave y o u a ctiv e ly c o ntr ib ute d to ? Is th ere
a m odule th at y o u
help ed s ta rt o r y o u h ad
a m ajo r in flu ence o n, s u ch a s
th e
datetime
m odule ?
Can non
: M y in flu ence w as actu ally th e
time
m odule . I pre date th e
datetime
m odule ! The fir s t m odule s th at I eve r auth ore d w ere th e
dummy_thread
a nd
dummy_threading
m odule s th at w ere in P yth on 2 .
That w as a noth er o ne o f th ose in sta nce s w here s o m eone c a m e fo rw ard

and r e co m mended
it a s a c o ol th in g to d o. T hey s a id th ey'd g et to it , b ut
ove r tim e th ey d id n't g et
to it , s o I e m aile d th em s a yin g, "H ey, a re y o u
goin g to g et to th is ? " T hey s a id n o,
but th at it w ould s till b e a u se fu l th in g
to d o, s o I d id it . T hose w ere th e fir s t
module s th at I e ve r a uth ore d fr o m
scra tc h .
I'v e e sse ntia lly to uch ed, I th in k, e ve ry th in g in th e P yth on la nguage a t th is
poin t.
I'v e e ve n to uch ed th e p ars e r, w hic h v e ry fe w p eople e ve r h ave to
to uch . I th in k th at
I h elp ed to w rit e w arn in gs fo r s o m e to ke niz a tio n th in g
at o ne p oin t. I p la ye d a b ig
part in th e c o m pile r, w hen w e s w it c h ed fr o m
goin g fr o m a c o ncre te s yn ta x tr e e to b yte c o de, to th en h avin g a p ro per
co ncre te s yn ta x
tr e e, to a n a bstr a ct s yn ta x tr e e to P yth on.
Bre tt C an non: 'I 'v e e ssen tia lly t o uch ed , I t h in k, e very th in g in t h e
Pyth on la n guag e
at t h is p oin t.'
Je re m y H ilt o n h ad s ta rte d th at
pro je ct, a nd G uid o v a n R ossu m b asic a lly
gave e ve ry o ne a n u lt im atu m , b eca use th e p ro je ct
had b een ta kin g y e ars
to fin is h . S o G uid o s a id , " Y ou h ave u ntil th e n ext r e le ase to
fin is h th is ."
Bre tt C an non: 'S o G uid o s aid , " Y ou h ave u ntil t h e n ext r e le ase t o
fin is h t h is ." '
I ju m ped in a nd h elp ed J e re m y to c a rry it th e la st h alf o f th e w ay. I d id a
sim ila r
th in g w it h th e
warnings
m odule . N eil N orb it s had sta rte d to
im ple m ent it , b ut h e k in d o f d rif te d o ff th e
pro je ct, s o I p ic ke d it u p a nd
fin is h ed it th e re st o f th e w ay. T hat's h ow I e nded
up b ein g o ne o f th e
people w ho k n ew th e
warnings
m odule a lit tle to o w ell!
What e ls e h as le d m e to b eco m in g s o in vo lv e d in P yth on? P ro bably th e
one th in g th at
I'm m ost k n ow n fo r is
importlib
. I w ro te m ost o f th e c u rre nt
im ple m enta tio n o f
import
(a ll o f it fo r P yth on 3 .3 ) a nd th en N ic k C oghla n
and E ric S now help ed a lo t su bse quently ,
but th e w hole
importlib
packa ge w as m y d oin g. T hose a re th e o nes th at c o m e to m in d in te rm s o f
what c a m e
dir e ctly fr o m m e, b ut I'v e b asic a lly ju st to uch ed e ve ry th in g
eve ry w here . I c a n't k e ep
tr a ck a nym ore a fte r 1 4 y e ars !

Dris co ll
: I k n ow w hat y o u m ean. I h ate it w hen I c o m e a cro ss s o m e c o de
and I th in k, " W ho w ro te
th is , a nd w hy is it s o b ad?" I th en r e m em ber th at I
wro te it a g ood tw o y e ars a go!
Can non
: Y eah, if y o u m anage to re ad y o ur o w n c o de fr o m s ix m onth s
ago a nd it s till lo oks
good, th en th ere 's p ro bably s o m eth in g w ro ng. It
usu ally m eans y o u h ave n't le arn ed
so m eth in g n ew y e t.
Bre tt C an non: 'I f y o u m an ag e t o r e ad y o ur o w n c o de f r o m s ix
month s a g o a n d it s till
lo oks g ood… it u su ally m ean s y o u h aven 't
le arn ed s o m eth in g n ew y et.'
Dris co ll
: W hat d o y o u c o nsid er to b e th e b est th in g a bout b ein g a c o re
deve lo per o f P yth on?
Can non
: P ro bably ju st th e fr ie ndsh ip s th at I'v e m ade th ro ugh b ein g o ne.
A lo t o f th e c o re
deve lo pers a re fr ie nds o f m in e.
We g et to geth er o nce a y e ar a nd I g et to s p end a lm ost 2 4 h ours a d ay fo r
a w hole w eek
wit h a lo t o f th ese p eople . T hat's o n to p o f th e tim e I g et to
sp end w it h th em o nlin e
th ro ughout th e r e st o f th e y e ar. It's p ro bably m ore
tim e th an I g et to s p end w it h
a lo t o f m y fr ie nds, b eca use h ow o fte n d o
yo u a ctu ally g et to ta ke b asic a lly a fu ll
week o f v a ca tio n w it h g ood fr ie nds
of y o urs ?
So y e ah, it 's h o nestly
th e fr ie ndsh ip s a t th is p oin t. It's b ein g a ble to h ang
out a nd w ork w it h th ese p eople ,
le arn fr o m th em a nd e njo y w hat w e d o
and k e ep d oin g th at.
I d on't th in k a bout th e im pact o f P yth on ve ry o fte n. It's a lit tle m in d-
bogglin g s o m etim es
to th in k a bout, s o I tr y n ot to d w ell o n it . I d on't w ant
any fo rm o f a n e go b eca use
of it , s o I tr y to a ctiv e ly n ot th in k a bout it to o
much . If I d o ju st s it h ere a nd
th in k a bout w ork in g o n th is la nguage th at's
use d b y h ow eve r m any m illio ns o f d eve lo pers ,
th en th at's a b it o f a n e ye -
opener. It's k in d o f c o ol to b e a ble to s a y th at I w ork
on th at, b ut p rim arily
it 's a bout g ettin g to w ork w it h fr ie nds.
I s till r e m em ber v e ry c le arly w hen I fir s t jo in ed th e te am , a nd e ve n fu rth er

back
when I jo in ed th e m ailin g lis t, s o a lt h ough p eople s a y I'm o ne o f
th ese b ig h ig h-u p
le ads o n th e P yth on d eve lo per te am , I'v e n eve r fu lly
acclim ate d to th at id ea. I ju st
don't th in k of m yse lf th at w ay. G uid o
fa m ously w as o nce a ske d a t G oogle , " O n a s ca le
of o ne to te n, h ow w ell
do y o u k n ow P yth on?" H e s a id a n e ig ht.
'G uid o f a m ously w as o nce a sked a t G oogle , " O n a s cale o f o ne t o
te n , h ow w ell d o y o u
kn ow P yth on?" H e s aid a n e ig ht.'
No o ne k n ow s th e e ntir e s yste m , b eca use it 's w ay to o b ig a p ro gra m to
kn ow . W e c a n
all fit th e b asic s e m antic s in o ur h eads, b ut n ot a ll th e
in tr ic a te deta ils of how
it actu ally w ork s. H ow m any people kn ow
descrip to rs o r m eta c la sse s lik e th e b ack
of th eir h and? I h ave to lo ok u p
th at s tu ff o n o cca sio n, s o n obody k n ow s th e w hole
syste m .
Dris co ll
: S o w here d o y o u s e e P yth on g oin g a s a la nguage, a s a w hole ?
Do y o u s e e it g ettin g
more p opula r in c e rta in fie ld s, o r is P yth on g ettin g
in to le gacy s ta tu s lik e C ++?
Can non
: P yth on is in a n in te re stin g p osit io n to day, w here th ere a re v e ry
fe w p la ce s w here
Pyth on h asn 't p enetr a te d in to a s a m ajo r p la ye r. S ure ,
th ere are ce rta in are as, lik e
lo w -le ve l opera tin g syste m s and ke rn el
deve lo pm ent, th at d on't s u it P yth on, b ut o th erw is e
it c a n fe el lik e P yth on
is
pre tty m uch e ve ry w here .
The o ne p la ce I k n ow w e'r e s till s e co nd w it h P yth on is in d ata s cie nce . I
th in k o ur
gro w th tr e nds p ro je ct th at P yth on w on't im media te ly o ve rta ke R
as a d ata s cie nce la nguage
in th e n ext c o uple o f y e ars a t le ast. B ut lo ng
te rm , I d o th in k th at P yth on w ill c a tc h
up. O th erw is e , I ju st d on't k n ow
ve ry m any o th er fie ld s, th at d on't re quir e a s yste m s
la nguage, w here w e
are n't c o m petit iv e fo r fir s t p la ce w it h P yth on.
I s u ppose a noth er a re a, w here
Pyth on is n 't s o s tr o ng, m ay b e d eskto p
apps, to a c e rta in e xte nt. E ve n o n th e d eskto p,
people u se u s, s o it 's n ot
lik e it 's d evo id , b ut th ere 's ju st a lo t o f c o m petit io n
in th at s p ace . In th e
lo ng te rm , a nd w e m ig ht e ve n b e th ere a lr e ady, w e w ill h it th e
tip pin g
poin t w here th ere 's s o m uch P yth on c o de e ve ry w here , th at P yth on it s e lf
will
pro bably n eve r g o a w ay.

Bre tt C an non: 'I n t h e lo ng t e rm , a n d w e m ig ht e ven b e t h ere a lr e ad y,
we w ill h it t h e
tip pin g p oin t w here t h ere 's s o m uch P yth on c o de
every w here , t h at P yth on it s elf w ill
pro bab ly n ever g o a w ay.'
Hopefu lly , P yth on w ill n eve r b e u tte re d in th e s a m e p assin g b re ath a s
CO BO L, a nd m ayb e
we'l l b e lo ve d a lit tle b it m ore a nd fo r lo nger, b ut I
don't s e e u s e ve r re ally g oin g
anyw here . I th in k th ere 's ju st to o m uch
co de a t th is p oin t to h ave u s e ve r d is a ppear.
Dris co ll
: P yth on is o n e o f th e m ajo r la nguages in th e c u rre nt A I a nd
mach in e le arn in g b oom .
What d o y o u th in k m ake s P yth on s u ch a g ood
la nguage fo r th is ?
Can non
: I th in k th e e ase o f le arn in g P yth on is w hat m ake s it g ood fo r A I.
The p eople c u rre ntly
work in g in A I
has e xp anded b eyo nd ju st s o ftw are
deve lo pers , a nd n ow e nco m passe s p eople lik e d ata s cie ntis ts , w ho d o
not w rit e c o de
co nsta ntly .
That m eans th at th ere is a d esir e fo r a p ro gra m min g la nguage th at c a n
be e asily ta ught
to n on-p ro gra m mers . P yth on fit s th at n eed n ic e ly . Y ou
ca n lo ok a t h ow P yth on h as g arn ere d
tr a ctio n w it h p eople in th e s cie nce s
and in c o m pute r s cie nce e duca tio n, to s e e h ow
th is is n ot a n ew tr e nd.
Dris co ll
: S hould p eople m ove o ve r to P yth on 3 n ow ?
Can non
: A s s o m eone w ho h elp ed to
make P yth on 3 c o m e a bout, I'm n ot
exa ctly a n u nbia se d p ers o n to a sk a bout th is . I
obvio usly th in k p eople
sh ould m ake th e s w it c h to P yth on 3 im media te ly , to g ain th e
benefit s o f
what h as b een a dded to th e la nguage s in ce P yth on 3 .0 fir s t c a m e o ut.
Bre tt C an non: 'I h ope p eo ple r e aliz e t h at t h e t r a n sit io n t o P yth on 3
can b e d one g ra d ually ,
so t h e s w it c h d oesn 't h ave t o b e a b ru pt o r
esp ecia lly p ain fu l.'
I hope people re aliz e th at th e tr a nsit io n to P yth on 3 ca n be done
gra dually , s o th e
sw it c h d oesn 't h ave to b e a bru pt o r e sp ecia lly p ain fu l.
In sta gra m sw it c h ed in n in e
month s, w hile co ntin uin g to deve lo p new

fe atu re s, w hic h s h ow s th at it c a n b e d one.
Dris co ll
: L ookin g a head, w hat's h appenin g w it h P yth on 4 ?
Can non
: T he P yth on 4
th in g is a w hole co nve rs a tio n o f it s o w n, o f
co urs e . I h ave n't h eard m uch a bout P yth on
4, a nd I'd b e h appy to h ear
about it . It's m yth ic a l a nd it d oesn 't e xis t. P yth on 4
is lik e P y4 k d re am in g
ve rs u s P y3 k. J u st w here c o uld th e la nguage g o?
When it beco m es tim e to do P yth on 4, w e'l l pro bably cle an up th e
sta ndard lib ra ry
a good am ount and str ip it dow n. T here are so m e
la nguage e le m ents w e'l l p ro bably fin ally
get rid o f, in ste ad o f le avin g
th em in th ere fo r c o m patib ilit y w it h P yth on 2 .
Bre tt C an non: 'W hen it 's t im e t o d o P yth on 4 , w e'l l p ro bab ly c le an
up t h e s ta n dard
lib ra ry a g ood a m ount, a n d s tr ip it d ow n.'
For P yth on 4 , w e'l l lik e ly h ave a tr a cin g g arb age co lle cto r, in ste ad o f
re fe re nce
co untin g to g et th at p ara lle lis m . I d on't k n ow y e t, b ut th at's
where I s e e it g oin g:
more o r le ss th e s a m e, e sp ecia lly b eca use w e'v e
co m e to re ly m ore o n th e th in gs th at
th e c o m munit y h as b uilt u p a ro und
Pyth on. I m ean, o ne o f th e re aso ns w e h ave h uge
sta ndard lib ra rie s, is
beca use it n egate s th e in te rn et, r ig ht?
Pyth on it s e lf p re date s U nic o de a s a n o ff ic ia l s ta ndard , b eca use P yth on
fir s t w ent
public in F ebru ary 1 991 a nd U nic o de 1 .0 w ent fin al in O cto ber
1991. I w asn 't a w are
of th at. I h ad to lo ok it u p, b eca use it 's o ne o f th ose
th in gs w here p eople a sk m e,
"H ey, w hy d id n't y o u d o U nic o de fr o m th e
begin nin g lik e J a va ?" It's lik e , w ell, w e
pre date U nic o de, s o th at's w hy!
So in th e fu tu re , I d on't th in k th e s ta ndard lib ra ry w ill n eed to b e q uit e a s
big
as it is to day. W e d on't n eed it to b e if y o u c a n ju st
pip
in sta ll th e
equiv a le nt lib ra rie s.
We'r e lu cky e nough to h ave a v ib ra nt c o m munit y , s o w e h ave lo ts o f
alt e rn ativ e th ir d -p arty
lib ra rie s th at a re o f s u ch a h ig h s ta ndard , th at w e
ca n p ro bably th in o ut th e s ta ndard
lib ra ry a nd lo w er th e m ain te nance
burd en o n th e c o re d eve lo pers . I th in k w e c a n d o
th is in s o m e fu tu re

Pyth on re le ase s w it h out a ny ris k to th e c o m munit y b ein g a ble to
acce ss
qualit y m odule s. I th in k it 'l l m ake P yth on e asie r a nd le aner, a nd ju st
bette r
to w ork w it h .
Bre tt C an non: 'S o in P yth on 4 , I d on't t h in k t h e s ta n dard lib ra ry w ill
need t o b e
quit e a s b ig a s it is t o day.'
That's w hat I s u sp ect w e'l l d o, b ut I d on't g et to m ake th at c a ll. It s o unds
lik e
a g ood d re am a nyw ay. S o y e s, h opefu lly ! I'm y e t to h ave a nyo ne te ll
me I'm c o m ple te ly
in sa ne w hen I a nsw er q uestio ns a bout P yth on 4 w it h
th ese id eas, w hic h is a g ood lit m us
te st.
Dris co ll
: W hat d o y o u th in k is d riv in g th e re ce nt a nd g ro w in g in te re st in
Mic ro P yth on?
Can non
: P eople d o k e ep a skin g
m e a bout w rit in g a bout M ic ro P yth on.
While I
don't u se it m yse lf , I th in k th at it m ust b e g ettin g b ig ger, b eca use I
ke ep g ettin g
aske d a bout it ! I'm w illin g to b et it 's b eca use o f th e e duca tio n
se cto r, w it h a lo t
of p eople u sin g m ic ro bit s a nd a ll th at s tu ff . S o th at's
pro bably w here a ll th e M ic ro P yth on
in te re st is c o m in g fr o m .
Dris co ll
: H ow c a n w e a ll s ta rt to c o ntr ib ute to th e P yth on la nguage? H ow
do w e g et s ta rte d?
Can non
: W e h ave th is th in g c a lle d
th e D ev G uid e, w hic h I s ta rte d w rit in g
back in 2 011 . Its fu ll
nam e is th e
Pyth on D eve lo per's G uid e
. B asic a lly , th e
Dev G uid e outlin es eve ry th in g yo u need to kn ow so th at yo u ca n
co ntr ib ute
to th e P yth on la nguage.
Bre tt C an non: 'T he D ev G uid e o utlin es e very th in g y o u n eed t o k n ow
so t h at y o u c an
co ntr ib ute t o t h e P yth on la n guag e.'
The D ev G uid e (
http s://d evg uid e.p yth on.o rg /
) s h ow s y o u h ow to g et th e
Pyth on so urc e co de, co m pile it and ru n th e te st su it e .
It
off e rs
su ggestio ns fo r h ow y o u c a n fin d th in gs th at y o u'd lik e to c o ntr ib ute . Y ou'l l
als o fin d th e d ocu m enta tio n fo r c o re d eve lo pers , w hic h s h ow s y o u h ow

yo u c a n d o a
co de r e vie w a nd e ve ry th in g e ls e .
The D ev G uid e is a ra th er la rg e d ocu m ent a t th is p oin t a nd it 's k in d o f
ta ke n o n a
lif e o f it s o w n. I ju st te ll p eople to g o a nd r e ad th e D ev G uid e,
and tr y to h ave
an id ea a bout w hat y o u w ant to h elp w it h . P ic k a m odule
th at y o u'r e re ally fa m ilia r
wit h , th at y o u c o uld h elp to fix b ugs in , o r th at
yo u fe el v e ry c o m fo rta ble w it h .
We h ave a c o re m ento rs h ip m ailin g lis t a s w ell, w hic h is n ot a rc h iv e d o n
purp ose s o
th at y o u c a n a sk
any
q uestio n, a nd y o u d on't h ave to w orry
about s o m eone fin din g it fiv e y e ars la te r.
So s ig n u p fo r c o re m ento rs h ip ,
re ad th e D ev G uid e a nd th en fin d s o m eth in g th at y o u
want to d o!
Dris co ll
: C an w e c o ntr ib ute to P yth on
th ro ugh c o de r e vie w s?
Can non
: Y es, in fa ct a t th is p oin t I'v e a ctu ally s ta rte d to tr y to n udge
people to w ard s
doin g c o de re vie w s, so if yo u'r e re ally fa m ilia r w it h a
module a nd th ere 's a p ull
re quest o n G it H ub fo r it , p le a se g o fo r it a nd d o
a c o de r e vie w fo r th at p ull r e quest.
If yo u fe el co m fo rta ble d oin g co de re vie w s a nd re vie w in g stu ff o n a
module th at yo u
use re gula rly or not, th at's a re ally gre at w ay to
co ntr ib ute to th e d eve lo pm ent o f
th e P yth on la nguage.
Bre tt C an non: 'I f y o u f e el c o m fo rta b le d oin g c o de r e vie w s a n d
re vie w in g s tu ff o n a
module t h at y o u u se r e g ula rly o r n ot, t h at's a
re ally g re at w ay t o c o ntr ib ute t o t h e
develo pm en t o f t h e P yth on
la n guag e.'
The big gest lim it a tio n w e have , in driv in g Pyth on fo rw ard s, is th e
bandw id th o n th e
co re d eve lo pers . S o y o ur c o de re vie w s c a n re ally h elp
to m ake th e p ro je cts e asie r
to m anage. P le ase h elp u s to g et m ore
patc h es in , a nd b ugs fix e d, b y jo in in g in .
Dris co ll
: H ow e ls e c a n w e c o ntr ib ute to th e P yth on la nguage?
Can non
: A b ig h elp to th e P yth on c o m munit y is to a nsw er q uestio ns th at
yo u s e e p eople a skin g
about P yth on, a nd to a nsw er th ose q uestio ns b y

ju st b ein g o pen a nd h onest. It's a ls o
im porta nt, o f c o urs e , n ot to b e a je rk
when y o u ta lk a bout P yth on. It's fin e to ju st
be n ic e a bout it .
Dris co ll
: A re th ere a ny P yth on p ro je cts
d ow nstr e am th at s o m eone c a n
ju m p in a nd c o ntr ib ute to w ard s?
Can non
: Y es, if y o u d on't fin d a c u rre nt m odule th at in te re sts y o u, th en
yo u m ig ht fin d
it in te re stin g to c o ntr ib ute to s o m e o f th e P yth on p ro je cts
more d ow nstr e am th at n eed
th e h elp . F or in sta nce , th e n ext v e rs io n o f
th e P yth on p acka ge in dex c a n a lw ays u se
so m e h elp . J u m p o n b oard if
yo u fin d s o m eth in g d ow nstr e am th at y o u fin d in te re stin g.
Dris co ll
: H ow a bout
sta rte r p ro je cts ?
Can non
: H onestly , it 's re ally k in d o f h ard to h ave s ta rte r p ro je cts . W e
ty p ic a lly h ave e nough
people w ho a re in vo lv e d a nd w atc h in g to ju st ju m p
on a nd fix th em in sta ntly . S o it 's
hard to g et s ta rte d s o m etim es, w hic h is
why I'm s ta rtin g to p ush fo r m ore o f th e p ull
re quest r e vie w in g.
Dris co ll
: D urin g P yC on, I s e e th at th ere 's u su ally a s p rin t s e t o n th e
Pyth on la nguage. W hat
so rt o f th in gs d o y o u g uys d o in th ose P yC on
sp rin ts ?
Can non
: I'v e le d a n um ber o f th ose
P yC on s p rin ts m yse lf , a nd w hat w e
usu ally d o is s it th e P yth on c o re te am d ow n a ro und
so m e ta ble s in o ne o f
th e s p rin t r o om s, a nd m ore o r le ss ju st s a y, " H ey, if y o u w ant
to c o ntr ib ute
th en c o m e o n in ."
We te ll P yC on s p rin t a tte ndees th e e xa ct s a m e th in gs th at w e s a y to
eve ry o ne w ho w ants
to c o ntr ib ute re m ote ly : h ere 's th e D ev G uid e, re ad
it , g et y o ur to ol c h ain u p a nd
ru nnin g, a nd lo ok fo r s o m eth in g to w ork o n.
If y o u fin d s o m eth in g th en g o fo r it .
Bre tt C an non: 'W e t e ll P yC on s p rin t a tte n dees...h ere 's t h e D ev
Guid e, r e ad it , g et
yo ur t o ol c h ain u p a n d r u nnin g, a n d lo ok f o r
so m eth in g t o w ork o n.'
Of c o urs e , a t th e s p rin ts , w e'r e th ere in th e r o om to a nsw er a ny q uestio ns

th at a nyo ne
may h ave . T yp ic a lly , s o m eone lik e R . D avid M urra y w ill fin d a
lis t o f e asy b ugs to
hand o ut to p eople in th e s p rin t ro om . It's a g re at
opportu nit y fo r p eople to c o m e
in a nd s a y h ello . If th ey w ant to s ta rt
co ntr ib utin g, th en th ey h ave c o re P yth on p eople
in th e ro om , s o th ey
have a q uic k tu rn aro und tim e fo r a nsw ers , in ste ad o f h avin g to
wait u ntil
so m eone se es th e e m ail a nd re plie s. It's ve ry m uch ju st tu rn to th e
pers o n
to y o ur le ft, o r to y o ur rig ht, a nd y o u c a n a sk a nd y o u g et y o ur
answ er.
Som etim es w e'l l g iv e a s h ort p re se nta tio n to s e t o ut w here w e'r e g oin g
durin g th e
sp rin t, a nd if p eople c a n jo in in th en th at's g re at. W e s a y, " H ere
are th e to ols ,
here 's h ow y o u ru n th e b uild , a nd h ere 's h ow y o u ru n th e
te sts ." T hen w e g et c o din g.
The s p rin ts a re v e ry la id b ack a nd re la xin g c o m pare d to th e re st o f a
co nfe re nce .
I th oro ughly r e co m mend th em w hen y o u c a n m ake th em . It's
ju st n ot a s h ectic in a s p rin t
ro om a s in th e m ain a re a o f a s h ow . T hat's
beca use th ere a re le ss p eople , a nd e ve ry o ne's
ju st k in d o f s it tin g d ow n
and re la xin g. T here a re n o tr a nsit io ns, e xce pt to a nd fr o m
lu nch , a nd it 's
easie r to fin d p eople to h ave co nve rs a tio ns w it h , w hic h is g re at.
So
sp rin ts a re d efin it e ly fu n to g o to , a nd I'm g oin g to tr y to g o to o ne in th e
next
ye ar o r tw o if I c a n.
Bre tt C an non: 'W e s ay, " H ere a re t h e t o ols , h ere 's h ow y o u r u n t h e
build , a n d h ere 's
how y o u r u n t h e t e sts ." T hen w e g et c o din g.'
Dris co ll
: S om e o th er te am s h ave n ic e lit tle e ntic e m ents to o, lik e if y o u
are h elp in g o ut w it h
Russe ll K eit h -M agee's B eeW are p ro je ct, w here y o u
get a c h alle nge c o in o n y o ur fir s t
co ntr ib utio n. H ave y o u s e en th ose ?
Can non
: Y es, if y o u h elp R usse ll's p ro je ct o ut h e g iv e s y o u a c h alle nge
co in . It's a b ig
and im pre ssiv e m eta l c o in . T he o ne I'm h old in g in m y h and
rig ht n ow is o ne th at I
earn ed fr o m R usse ll a nd it ta ke s u p a g ood c h unk
of m y N exu s 5 X s cre en!
Here 's h ow I e arn ed m y ch alle nge co in fr o m R usse ll: if yo u m ake a
co ntr ib utio n th at
th e B eeW are p ro je ct a cce pts , su ch a s d ocs o r w hat
have y o u, th en y o u g et o ne o f th ese
co in s th e n ext tim e y o u s e e R usse ll

in p ers o n. S o in m y c a se , I h appened to b e o n
Tw it te r o ne d ay w hen
Russe ll tw eete d a bout a n e xa m ple r e po, a nd I fo und a c o uple o f
ty p os. I
se nt a p ull re quest to g et th em fix e d a nd
th at's h ow I fin ally g ot m y c o in .
I'd b een w antin g o ne fo r a ge s, b eca use I th in k it
is a re ally c o ol to ke n o f
appre cia tio n, a nd a nyo ne c a n e arn o ne if th ey c o ntr ib ute .
If y o u d on't k n ow a nyth in g a bout c h alle nge c o in s, th en 9 9% In vis ib le h ad
a re ally
good podca st epis o de exp la in in g th ese th in gs
( http s://9 9perc e ntin vis ib le .o rg /e pis o de/c o in -c h eck/
).
Bre tt C an non: 'I f y o u d on't k n ow a n yth in g a b out c h alle n ge c o in s,
th en 9 9% In vis ib le
had a r e ally g ood p odcast e p is o de e xp la in in g
th ese t h in gs.'
Dris co ll
: D oes th e P yth on c o re te am o ff e r s o m e in ce ntiv e s lik e R usse ll's
ch alle nge c o in s?
What d o y o u fe el is th e c o re s p ir it a nd in ce ntiv e fo r
people to c o ntr ib ute to th e
Pyth on la nguage?
Can non
: I'v e a lw ays w ante d to m ake a c h alle nge c o in fo r P yth on, b oth
fo r p eople w ho a re
co re d eve lo pers a nd fo r p eople w ho h ave c o ntr ib ute d
a p atc h . T hat's a n eat id ea. B ut
I a ls o d on't tr a ve l a s m uch a s R usse ll, s o
it 's a lit tle h ard er b eca use I'd n eed to
be a t th e c o nfe re nce s th at p eople
are a tte ndin g in o rd er to g iv e th em th e c o in s. B ut
it 's a c o ol id ea a nd I
wis h m ore p ro je cts d id it .
The P yth on co re ty p ic a lly ta ke s a ve ry , kin d o f, p assiv e a ppro ach to
in ce ntiv e s. It's
tr u e, b ut th at is re ally ju st b eca use w e'r e p uttin g m ost o f
our tim e in to th e P yth on
la nguage e le m ents th at w e w ant to g et d one,
and w e k n ow th at a lo t o f p eople a re g oin g
to a ppre cia te . T hat re ally is
our d eep in ce ntiv e to c o ntr ib ute to P yth on, a nd I w elc o m e
eve ry o ne to
jo in in , w heth er r e m ote ly , o r d urin g a c o nfe re nce s p rin t.
Dris co ll
: T hank y o u, B re tt C annon.

C hap te r 2 . S te ve H old en
S te ve H old en
is a B rit is h c o m pute r p ro gra m mer a nd a fo rm er c h air m an
a nd d ir e cto r o f th e P yth on
Softw are F oundatio n (P SF). H e is th e a uth or
o f
Pyth on W eb P ro gra m min g
a nd
c o -a uth ore d th e th ir d
e dit io n o f
Pyth on
i n a N uts h ell
w it h A le x M arte lli
a nd
Anna R ave nscro ft. S te ve w ork s a s
c h ie f te ch nic a l o ff ic e r a t G lo bal S tr e ss In dex, a
str e ss m anagem ent s ta rt-
u p in th e U K, w here h e o ve rs e es th e a pplic a tio n o f te ch nolo gy
pro ducin g
s yste m s. A ca re er pro m otin g th e P yth on la nguage has ta ke n S te ve
a ro und th e
world . H e c o ntin ues to s u pport o pen s o urc e P yth on p ro je cts
a nd s p eak a t te ch c o nfe re nce s.
Dis cu ssio n t h em es: P yC on, t h e P SF, t h e f u tu re o f P yth on.
Catc h u p w it h S te ve H old en h ere : @ hold en w eb
M ik e D ris co ll
: S o co uld yo u te ll m e
w hy yo u d ecid ed to b eco m e a
c o m pute r p ro gra m mer?
S te ve H old en
: In e sse nce , I w as v e ry fo nd o f e le ctr o nic s in m y e arly
t e ens. I sw it c h ed fr o m ch em is tr y
to ele ctr o nic s beca use a ch em is tr y
t e ach er tu rn ed m e o ff th e s u bje ct.
S o I s ta rte d m y c a re er a t th e a ge o f 1 5 a s a tr a in ee p ro ductio n e ngin eer
i n a te le vis io n
fa cto ry . A fte r 1 8 m onth s, th at w asn 't r e ally g oin g a s w ell a s

it s h ould . I b egan to
lo ok a ro und fo r n ew e m plo ym ent a nd I s a w a jo b
adve rtis in g a ju nio r te ch nic ia n ro le
at th e c o m putin g la bora to ry , a t m y
lo ca l u niv e rs it y in B ra dfo rd . S o I a pplie d fo r
th e jo b a nd w hen I g ot th ere ,
it tu rn ed out th at ju nio r te ch nic ia n w as ju st a jo b
gra de. W hat th ey
actu ally w ante d w as a k e yp unch o pera to r.
The d ir e cto r o f th e la b
th ought th at I w as in d anger o f g oin g o ff th e ra ils .
He d ecid ed th at I s h ould ta ke
a jo b w it h th e la bora to ry fo r s ix m onth s a nd
le arn a bout c o m pute rs . S o o bvio usly I
did n't g et in to th e e le ctr o nic s s id e
of it , b eca use in th ose d ays, c o m pute r m ain te nance
was a n e xtr e m ely
sp ecia liz e d jo b. B ut I le arn ed h ow to o pera te a c o m pute r a nd I le arn ed
how to p ro gra m . T hat w as th e s ta rt o f m y c a re er in c o m putin g.
Dris co ll
: T hat m ake s s e nse to m e! S o w hat m ade y o u s ta rt
usin g P yth on
and w hat m ake s it s p ecia l to y o u?
Hold en
: W ell, in th e early 1970s, I deve lo ped an in te re st in obje ct-
orie nte d p ro gra m min g
when I fin ally , a t th e a ge o f 2 3, w ent to u niv e rs it y . I
ca m e a cro ss so m e o f th e e arly
papers o n S m allt a lk fr o m A la n K ay's
gro up a t X ero x P A R C.
Ste ve H old en : 'I n t h e e arly 1 970s I d evelo ped a n in te re st in o bje ct-
orie n te d p ro gra m min g.'
The g ro up s e em ed to h ave a v e ry n ove l a ppro ach to c o m putin g, s o I g ot
in te re ste d in
Sm allt a lk . E ve ntu ally , a bout 1 2 ye ars la te r, w hen I w as
work in g a t M anch este r U niv e rs it y ,
I a ctu ally g ot th e c h ance to p la y w it h
Sm allt a lk
fo r th e fir s t tim e. I g ot a r e se arc h s tu dent to im ple m ent it fo r m e.
There w as n o
UK im ple m enta tio n o f S m allt a lk a t th e tim e. I d is co ve re d
th at a ctu ally I d id n't re ally
lik e S m allt a lk v e ry m uch . S o I g ave u p o n
obje ct- o rie nte d p ro gra m min g fo r a bout a noth er
10 y e ars .
It w as a ctu ally w hen I m ove d to th e U nit e d S ta te s th at I c a m e a cro ss a
book o n P yth on.
I th in k it w as
Learn in g P yth on
, w hic h w as a t th at
tim e b y
Mark L utz a nd D avid A sch er. I
re aliz e d th at P yth on w as th e la nguage fo r
me! P yth on
is a s e nsib le , c o m pre hensib le , a nd u nders ta ndable w ay to d o
obje ct- o rie nte d p ro gra m min g.

Ste ve H old en : 'I f o und t h at m y k n ow le d ge o f t h e la n guag e g re w v ery
quic kly a n d p re tty
so on I w as a n sw erin g a lo t o f q uestio ns.'
I d id w hat p eople d id in th ose d ays, w hic h w as to jo in th e P yth on lis t. I
fo und th at
my k n ow le dge o f th e la nguage g re w v e ry q uic kly a nd p re tty
so on I w as a nsw erin g a lo t
of q uestio ns. I th in k th at in to ta l I w as a ctiv e
on c o m p.la ng.p yth on fo r a bout e ig ht
ye ars . I m ade a lm ost 2 00,0 00 p osts !
That's a lo t o f p osts ! A lt h ough u nfo rtu nate ly ,
I th in k th at G oogle h as le t
most of th at stu ff dis a ppear now , so th e his to ry is gone
fr o m
co m p.la ng.p yth on.
Dris co ll
: P yth on is b ein g u se d n ow in A I a nd m ach in e le arn in g. W hat d o
yo u th in k m ake s P yth on
so p opula r?
Hold en
: P yth on h as s e ve ra l a dva nta ges: it 's e asy to
re ad a nd y o u c a n
exp erim ent in te ra ctiv e ly w it h o bje cts
th at y o u c re ate in a c o nso le o r ID E.
Pyth on als o pro vid es re la tiv e ly easy w ays to
in te ra ct w it h co m pile d
la nguages th at p ro vid e s p eed in la rg e c a lc u la tio ns (n obody
exp ects th e
Spanis h In quis it io n).
Dris co ll
: D o y o u th in k th at th ere a re a ny p ro ble m s c u rre ntly w it h th e
Pyth on la nguage o r it s
co m munit y ?
Hold en
: T he P yth on co m munit y (w hic h is a ctu ally a la rg e n um ber o f
in te rs e ctin g c o m munit ie s)
ju st s e em s to g o fr o m s tr e ngth to s tr e ngth .
I a m h appy to sa y th at P yth on a ppears to b e w id ely a cce pte d a s a
la nguage, wit h a
fr ie ndly and welc o m in g co m munit y . The Pyth on
Softw are F oundatio n (P SF) is n ow in a
posit io n to h elp to fu nd v o lu nte er
activ it ie s and off e r a fin ancia l um bre lla , as lo ng
as th ose activ it ie s
pro m ote a nd s u pport th e m is sio n o f th e P SF.
Ste ve H old en : 'T he P yth on S oftw are F oundatio n ( P SF) is n ow in a
posit io n t o h elp t o
fu nd v o lu nte er a ctiv it ie s a n d o ff e r a f in an cia l
um bre lla .'
Havin g ju st c o m ple te d w rit in g th e th ir d e dit io n o f
Pyth on in a N uts h ell
,

wit h A le x M arte lli a nd A nna R ave nscro ft, I w ould s a y th at th e la nguage is
in pre tty
good sh ape. H ow eve r, I th in k th at th e new asyn ch ro nous
prim it iv e s a re p ro vin g to b e
more d if f ic u lt fo r th e a ve ra ge p ro gra m mer to
le arn th an th ey s h ould b e.
Guid o v a n R ossu m
a nd th e o th er c o re d eve lo pers h ave d one a g re at jo b
of n ot d is to rtin g th e la nguage
to o fa r in o rd er to m ake th e a ddit io ns. B ut
th e a syn ch ro nous p ara dig m , th at is s o
fa m ilia r to T w is te d d eve lo pers ,
is n 't quit e as in tu it iv e ly obvio us as a sim ple syn ch ro nous
ta sk
sp ecif ic a tio n.
Ste ve H old en : 'I a m a lit tle c o ncern ed t h at P yth on d evelo pm en t is n 't
doin g a w hole
lo t f o r t h e a vera g e m ain str e am u ser.'
To b e fr a nk, I a m a lit tle c o nce rn ed th at P yth on
d eve lo pm ent is n 't d oin g a
whole lo t fo r th e a ve ra ge m ain str e am u se r. A h uge a m ount
of w ork h as
been d one to b rin g a syn ch ro nous p ro gra m min g in to th e la nguage, w hic h
now
in clu des a co opera tiv e m ult it a skin g m ech anis m th at o bvia te s th e
need fo r th re ads.
As th is w ork h as p ro ce eded, th e d eve lo pers h ave p erc e iv e d a n eed fo r
va lu es th at are
priv a te to th e exe cu tio n co nte xt of a sp ecif ic
asyn ch ro nous co m puta tio n. You ca n th in k
of th em as
asyncio
's
equiv a le nt o f th re ad-lo ca l v a ria ble s. A s I'v e fo llo w ed d is cu ssio ns o n th e
Pyth on-D ev
lis t, I'v e se en m uch eru dit e dis cu ssio n of is su es th at I
su sp ect w ill n eve r im pact
99.5 % o f P yth on u se rs . S o I a m th ankfu l th at
Pyth on is s o d edic a te d to b ackw ard c o m patib ilit y !
Ste ve H old en : 'I 'v e s een m uch e ru dit e d is cu ssio n o f is su es t h at I
su sp ect w ill n ever
im pact 9 9.5 % o f P yth on u sers .'
I fe el s im ila rly , a lt h ough ra th er le ss s tr o ngly , a bout th e in tr o ductio n o f
annota tio ns
to P yth on. T hey w ere fir s t p ro pose d a s a n e ntir e ly o ptio nal
ele m ent o f th e la nguage,
but b eca use p eople a re u sin g th em , th ey a re
ra is in g is su es th at a re in cre asin g th e
pre ssu re to a llo w a nnota tio ns in
pla ce s lik e th e s ta ndard lib ra ry .

I'd lik e it to b e p ossib le fo r b egin ners to c o ntin ue to le arn th e la nguage,
while
re m ain in g to ta lly u naw are o f e ve n th e p ossib ilit y o f a nnota tio ns,
whic h c a n th en b e
added la te r a nd c o m ple te ly o rth ogonally to th e r e st o f
th e la nguage. I'm n ot c o nfid ent
th at th is w ill c o ntin ue to b e th e c a se .
Lookin g o n th e b rig ht s id e, th e re la tiv e ly s im ple d eve lo pm ent o f th e f-
str in g n ota tio n
has b een so e nth usia stic a lly a dopte d b y th e P yth on 3
co m munit y , th at lo ts o f c o de
is b ein g w rit te n th at w on't r u n o n 3 .5 , s im ply
beca use it u se s f- s tr in gs. A s
usu al, D ave B eazle y h as fo und d ia bolic a l
th in gs to d o w it h f- s tr in gs, w hic h is a lw ays
fu n.
Dris co ll
: H ow c a n w e o ve rc o m e th ose is su es?
Hold en
: I'm n ot s u re th at th ere 's a ny n eed fo r h uge e ff o rts to o ve rc o m e
th ose is su es. It's
im porta nt n ot to b eco m e c o m pla ce nt a nd to k e ep u p th e
eff o rts to im pro ve th e la nguage
and b ro aden it s c o m munit y to b eco m e
eve r la rg er a nd m ore d iv e rs e . P yC on p ro ve d th at
te ch nic a l c o m munit ie s
ca n, to a
la rg e e xte nt, b e s e lf - o rg aniz in g.
Mik e D ris co ll: I k n ow th at y o u h ave b een th e c h air m an o f P SF a n d
PyC on in t h e p ast.
How d id y o u f ir s t b eco m e in vo lv ed ?
Hold en
: I w ent to m y fir s t, a nd e ff e ctiv e ly th e la st, In te rn atio nal P yth on
Confe re nce in
2002. W hile th e c o nte nt w as g re at, th e e ve nt w as r u n b y a
co m merc ia l g ro up th at d id
a lo t o f b usin ess w it h G uid o's th en e m plo ye r,
so it w as g eare d to th ose w ho h ad th e
budget to a tte nd.
While th is h ad b een fin e in th e e arly d ays o f th e la nguage, it w as o bvio us
to m e th at
if P yth on w as g oin g to b e re ally p opula r, th en it s c o nfe re nce
needed to o ff e r a h om e
to m any m ore p eople . T his in clu ded th e p eople
th at I w as e ngagin g w it h o n a d aily
basis o n c o m p.la ng.p yth on.
Ste ve H old en : 'I f P yth on w as g oin g t o b e r e ally p opula r, t h en it s
co nfe re n ce n eed ed
to o ff e r a h om e t o m an y m ore p eo ple .'
At th e e nd o f th at c o nfe re nce , G uid o m ade a n a nnounce m ent a bout th e
Pyth on S oftw are
Auth orit y (P SA), a m ore -o r-le ss n atio nal
g ove rn ance
body. P SA w as to b e re pla ce d b y a n on-p ro fit fo undatio n. G uid o a ls o

announce d
th e c re atio n o f a m ailin g lis t to d is cu ss c o nfe re nce s, w hic h I
eagerly a ntic ip ate d!
Sadly , th e
arc h iv e s (
http s://m ail. p yth on.o rg /p ip erm ail/ c o nfe re nce s/
) o nly
appear to g o b ack to M ay 2 009. B ut I r e m em ber w hen I la st lo oke d a t th e
co m ple te
co lle ctio n, m y m em ory o f w ait in g a lo ng tim e fo r a nyth in g to
appear w as c o m ple te ly
fa ls e . It to ok m e a bout tw o d ays to b eco m e th e
fir s t p oste r in th e lis t. I e xp re sse d
my o pin io n th at th e c o m munit y c o uld
and w ould d o a b ette r jo b o f o rg aniz in g th e co nfe re nce ,
on a p ure ly
co m munit y b asis .
Ste ve H old en : 'I e xp re ssed m y o pin io n t h at t h e c o m munit y c o uld
an d w ould d o a b ette r
jo b o f o rg an iz in g t h e c o nfe re n ce.'
I h ad th e g ood fo rtu ne, c o m ple te ly b y a ccid ent, to m ove to V ir g in ia . T his
was w it h in
20 o r 3 0 m ile s o f w here G uid o, J e re m y H ylt o n, B arry W ars a w ,
and F re d D ra ke w ere w ork in g
at d if f e re nt p la ce s, w hile th ey c o lla bora te d
on c o re P yth on.
That c re w , a lo ng w it h T im P ete rs , w ho h ad u ntil th en
liv e d in B osto n, g ot
to geth er a s e m plo ye es o f a c o m pany c a lle d B eO S. It lo oke d lik e
th at
co lla bora tio n h ad a b rig ht fu tu re a nd s o it w as a te rrib le b lo w w hen it
beca m e
obvio us afte r about six m onth s th at B eO S w as in tr o uble .
Fortu nate ly , Z ope C orp ora tio n,
whic h is n ow D ig it a l C re atio ns, re nte d a n
off ic e s p ace fo r th em a nd th ey e sta blis h ed
Pyth onLabs.
Dris co ll
: H ow d id y o u s ta rt
work in g w it h th e P yth on te am ?
Hold en
: I h ad b eco m e k n ow n d ue to m y v o lu m in ous c o ntr ib utio ns o n
co m p.la ng.p yth on a nd th e
public a tio n o f
P yth on W eb P ro gra m min g in
2002.
So w hen I c o nta cte d G uid o a nd s u ggeste d th at w e m ee t fo r lu nch , h e
in vit e d m e o ut
to th e o ff ic e o f P yth onLabs. I m et a ll fiv e o f th e te am a nd
th en w e w ent out fo r a
Chin ese lu nch at a pla ce clo se by. T hese
meetin gs b eca m e r e gula r e ve nts e ve ry c o uple
of w eeks o r s o a nd o ne o f
th e to pic s o f d is cu ssio n b eca m e w heth er th e c o m munit y re ally
co uld g et
behin d th e id ea o f h avin g n o p ro fe ssio nal o rg aniz e rs .

Ste ve H old en : 'O ne o f t h e t o pic s o f d is cu ssio n b ecam e w heth er t h e
co m munit y r e ally
co uld g et b eh in d t h e id ea o f h avin g n o
pro fe ssio nal o rg an iz e rs .'
I th in k b y th e la te 1 990s, G uid o r e aliz e d th at s o m eth in g a b it m ore fo rm al
was re quir e d
and so th e g uys fr o m P yth onLabs sta rte d th e P SF a nd
acq uir e d a c e rta in a m ount o f d onate d
fu ndin g. I e xp la in ed th at I'd b een
th e tr e asu re r o f D EC US U K & Ir e la nd in th e p ast
and h ad e xp erie nce o f
co m munit y c o nfe re nce s. G uid o s a id th at if I w ould a gre e to c h air
th e
co nfe re nce , th en th e P SF w ould u nderw rit e th e c o sts .
We re nte d sp ace in The Georg e W ash in gto n Univ e rs it y 's Cafr it z
Confe re nce C ente r a nd
announce d th e d ate s, w hic h re ce iv e d g enera l
excit e m ent. Then th e in fo rm al te am quic kly
esta blis h ed th e P yC on-
org aniz e rs lis t. I r e m em ber th at w e g ot a lo t o f h elp fr o m N ate
To rk in gto n,
who h ad e sta blis h ed th e Y A PC ( Y et A noth er P erl C onfe re nce )
id ea.
Ste ve H old en : 'T he e th os s o on e m erg ed t h at e very th in g p ossib le
would b e d one b y v o lu nte ers ,
to k eep c o sts d ow n.'
The e th os so on e m erg ed th at e ve ry th in g p ossib le w ould b e d one b y
vo lu nte ers , to k e ep
co sts d ow n. C ath erin e
D evlin s te pped in to o rg aniz e
th e fo od (ta kin g acco unt of eve ry o ne's die ta ry pre fe re nce s
is an
im possib le ta sk). I c a n't e ve n r e m em ber h ow th e tic ke ts w ere s o ld , s in ce
utilit y
sit e s w ere n't a va ila ble th en.
About 2 50 p eople tu rn ed u p fo r th e c o nfe re nce , w hic h w as p re ce ded b y a
tw o-d ay s p rin t
and tu to ria ls s e ssio n. A ll ta lk s w ere w ell a tte nded. T here
was a r e al b uzz a nd I w ent
aro und tr y in g to m ake s u re th at e ve ry o ne g ot
onto th e in te rn et.
That c o nfe re nce b ro ught th e T w is te d te am to geth er in p ers o n fo r th e fir s t
tim e. W hen
I le arn ed th at th ey w ere h avin g n etw ork in g p ro ble m s (m ost
syste m s b ack in th ose d ays
still n eeded a n E th ern et c a ble ), I im pre sse d
th em b y in sta llin g a lo ca l 1 00 M Hz h ub
ju st fo r th em .
Dris co ll
: W as th e c o nfe re nce a fin ancia l s u cce ss?

Hold en
: A t th e e nd o f th e c o nfe re nce , I a nnounce d th at it a ppeare d th at
th e e ve nt h ad m ade
ro ughly $ 17,0 00 fo r th e P SF.
Guid o p ro pose d th at I b e g iv e n h alf o f th e p ro fit s , b ut I o bje cte d o n th e
gro unds
th at th e P SF n eeded to b uild u p it s re se rv e s. H e a ls o p ro pose d
me a s a P SF m em ber,
an h onour th at I w as h appy to a cce pt. I w as d uly
vo te d in .
At OSC O N
th at ye ar, I in te rv ie w ed Guid o
( http ://w ww.o nla m p.c o m /p ub/a /p yth on/2 003/0 8/1 4/g vr_ in te rv ie w .h tm l
)
and h e ta lk e d a bout th e n eed to g et so m e m ore e xp erie nce d h ands
in vo lv e d w it h th e
PSF, w hic h a t th e tim e h e w as le adin g d ue to th e
re co gnit io n th at h is n am e le nt to
th e e nte rp ris e .
Ste ve H old en : 'I 'v e n ever b een a b ig f a n o f c o m munit y e ven ts
beco m in g t h e p ro perty
of in div id uals .'
At th e e nd o f th e s e co nd P yC on, w hic h w as in th e s a m e v e nue a y e ar
la te r, I a nnounce d
th at I w ould c h air o ne m ore c o nfe re nce . I'v e n eve r
been a b ig fa n o f c o m munit y e ve nts
beco m in g th e p ro perty o f in div id uals
and ch air in g had been ta kin g up an enorm ous am ount
of m y tim e.
Fortu nate ly , m ost o f m y in co m e b ack th en c a m e fr o m te ach in g w ork a nd
fle xib le
co nsu lt in g, th at I c o uld d o la rg ely fr o m h om e.
If m em ory s e rv e s m e c o rre ctly , it w as th at y e ar th at I w as e le cte d to th e
PSF board .
Guid o sto od dow n as ch air m an and th e board ele cte d
Ste phan D eib el to re pla ce h im ,
askin g G uid o to co ntin ue to se rv e a s
tit u la r p re se nt. T his m eant th at w hat tim e h e
had a va ila ble co uld b e
fo cu se d o n d eve lo pm ent, r a th er th an a dm in is tr iv ia .
Dris co ll
: S o, a t w hat p oin t d id y o u s te p d ow n fr o m y o ur ro le a s c h air o f
th e c o nfe re nce ?
Hold en
: A t th e e nd o f th e th ir d P yC on, w hic h w as a gain a nd fo r th e fin al
tim e in W ash in gto n
DC, nobody had sto od up to ch air th e next
co nfe re nce . I co uld n't eve n te ll th em th at
th ere w as goin g to be a
co nfe re nce th e fo llo w in g y e ar, le t a lo ne w hen a nd w here it
would b e.

Ste ve H old en : 'I h eld f ir m in m y b elie f t h at if P yC on w as g oin g t o
make it , t h en e ven
bro ad er s u pport n eed ed t o b e a ttr a cte d f r o m t h e
co m munit y .'
I r e ce iv e d s e ve ra l r e quests to c h air o ne m ore c o nfe re nce , b ut I h eld fir m
in m y b elie f
th at if P yC on w as g oin g to m ake it , th en e ve n b ro ader
su pport n eeded to b e a ttr a cte d
fr o m th e c o m munit y . A bout tw o m onth s
la te r, A ndre w K uch lin g a ppro ach ed m e to a sk w hat
was in vo lv e d a nd
ble ss h im h e ra n th e n ext tw o c o nfe re nce s, w hic h w ere h eld in D alla s,
Te xa s. T hey m ark e d th e tr a nsit io n to u sin g fu lly c o m merc ia l v e nues a nd
wit h th at,
PyC on h as g one fr o m s tr e ngth to s tr e ngth .
Dris co ll
: If so m eone w ants to le arn pro gra m min g, w hy sh ould th ey
ch oose P yth on?
Hold en
: T hat d epends o n w hat a ge th ey a re . I'd s u ggest th at u p to a bout
th e a ge o f te n,
a v is u al p ro gra m min g s yste m lik e S cra tc h m ig ht b e m ore
appro pria te .
Beyo nd th at a ge, P yth on is
d efin it e ly a cce ssib le e nough to b e a g ood fir s t
pro gra m min g la nguage. T here is a
huge a m ount o f o pen s o urc e P yth on
co de in d iv e rs e a re as. N ow adays, w hate ve r fie ld
yo u w ork in , it 's lik e ly
th at th ere w ill b e s o m e P yth on c o de th at y o u c a n u se a s a
sta rtin g p oin t.
Ste ve H old en : 'P yth on is d efin it e ly a ccessib le e n ough t o b e a g ood
fir s t p ro gra m min g
la n guag e.'
Dris co ll
: S o w hat c o din g te ch niq ues
d o y o u r e co m mend?
Hold en
: I'm a b ig fa n o f te st- d riv e n d eve lo pm ent, d esp it e h avin g s p ent
my fir s t 3 0 y e ars
as a p ro gra m mer n ot d oin g it . I s e e A gile a s b ein g m ore
desir a ble fr o m a busin ess
poin t of vie w , beca use it allo w s all
sta ke hold ers to s e le ct th e w ork th at's g oin g
to a dd m ost v a lu e to th e
busin ess.
I'v e ju st s p ent a lm ost a y e ar a nd a h alf w ork in g w it h a p erv e rs io n o f th at
appro ach .
I'm lo okin g fo rw ard to v a lid atin g in m y n ew jo b th at w hen ru n

se nsib ly , A gile m eth ods
are a p ro ductiv e w ay to w ork . B ut I s e e A gile le ss
as a co din g te ch niq ue and m ore
as a deve lo pm ent m anagem ent
meth odolo gy.
Pair p ro gra m min g is n 't u se d a s m uch a s it u se d to b e, b ut I th in k th at
fr o m a te ch nolo gy
tr a nsfe r poin t of vie w , it 's an in cre dib le
co m munic a tio ns to ol. Y ounger p ro gra m mers
don't s e em to s p end m uch
tim e o n c a re er d eve lo pm ent, b ut a s a m anager I w ant to s e e
my s ta ff
gro w in g a nd le arn in g. P air p ro gra m min g is o ne w ay th at th ey c a n a cq uir e
new
skills r e la tiv e ly p ain le ssly .
Dris co ll
: A fte r le arn in g th e b asic s o f P yth on, w hat n ext?
Hold en
: L ook a ro und fo r a p ro ble m th at in te re sts y o u a nd s e e if th ere a re
any o pen s o urc e
pro je cts in th at a re a.
Ste ve H old en : 'W hile e very n ew p ro gra m mer lik es t o t h in k t h at t h ey
can b re ak g ro und,
it 's a ctu ally m uch e asie r t o le arn b y
co lla b ora tin g.'
While e ve ry n ew p ro gra m mer lik e s to th in k th at th ey c a n b re ak g ro und,
it 's a ctu ally
much e asie r to le arn b y c o ll a bora tin g in a te am th at k n ow s
what it 's doin g. Te am work
ca n te ach yo u th e pra ctic a l so ftw are
engin eerin g skills th at are so va lu able in beco m in g
an eff e ctiv e
pro gra m mer.
People lik e to s a y th at a nyo ne c a n c o de, b ut s ig ns a re n ow e m erg in g th at
th is m ay
not b e tr u e. A nyw ay, b ein g a ble to c o de a lo ne is n ow here n ear
enough to b uild p ra ctic a l,
fu nctio nal a nd m ain ta in able s yste m s. A cq uir in g
th ose o th er s kills s h ould n't b e le ft
until y o u h ave m aste re d p ro gra m min g.
Mik e D ris co ll: W hat a b out P yth on t o day m ost e xcit e s y o u?
Hold en
: T he r e ally e xcit in g th in g is th e c o ntin ued d eve lo pm ent o f P yth on
co m munit ie s a nd
th e in cre ase in P yth on u sa ge, e sp ecia lly in e duca tio n.
This w ill e nsu re th at r e la tiv e ly
co m pre hensib le p ro gra m min g to ols w ill b e
re adily a va ila ble to a nyo ne th at n eeds th em
ove r th e n ext 2 0 y e ars .

I h ave o n m y d esk a F iP y d evic e th at h as W i- F i, B lu eto oth , L oR a, S ig fo x,
and ce llu la r
co m munic a tio ns on-c h ip , co ntr o lle d by a M ic ro P yth on
co ntr o lle r th at, b esid es h avin g
th e u su al h ard w are b ells a nd w his tle s, lik e
dig it a l in puts a nd o utp uts , g iv e s R EPL
acce ss to a ll o f th at fu nctio nalit y . I
ca n h ard ly w ait to r e tir e a nd p la y w it h th ese
th in gs p ro perly . Im agin e w hat
is g oin g to b eco m e a va ila ble o ve r th e n ext 1 0 y e ars !
Dris co ll
: W here d o y o u s e e th e P yth on la nguage
g oin g in th e fu tu re ?
Hold en
: I'm n ot re ally s u re w here th e la nguage is g oin g. Y ou h ear lo ose
ta lk o f P yth on 4 .
To m y m in d th ough, P yth on is n ow a t th e s ta ge w here
it 's c o m ple x e nough.
Ste ve H old en : 'Y ou h ear lo ose t a lk o f P yth on 4 . T o m y m in d t h ough,
Pyth on is n ow a t
th e s ta g e w here it 's c o m ple x e n ough.'
Pyth on h asn 't b lo ate d in th e s a m e w ay th at I th in k th e J a va e nvir o nm ent
has. A t th at
matu rit y le ve l, I th in k it 's ra th er m ore lik e ly th at P yth on's
id eas w ill s p aw n o th er,
perh aps m ore s p ecia liz e d, la nguages a im ed a t
partic u la r a re as o f a pplic a tio n. I s e e
th is a s fu ndam enta lly h ealt h y a nd I
have no w is h to m ake all pro gra m mers use P yth on
fo r eve ry th in g;
la nguage c h oic e s s h ould b e m ade o n p ra gm atic g ro unds.
I'v e n eve r b een m uch o f a o ne fo r p ush in g fo r c h ange. E nough s m art
people a re th in kin g
about th at a lr e ady. S o m ostly I lu rk o n P yth on-D ev
and o cca sio nally in te rje ct a v ie w
fr o m th e c o nsu m er s id e, w hen I th in k
th at th in gs a re b eco m in g a lit tle to o e so te ric .
Dris co ll
: S hould p eople m ove o ve r to P yth on 3 ?
Hold en
: O nly w hen th ey n eed to . T here w ill in evit a bly b e s yste m s w rit te n
in 2 .7 th at w on't
get m ig ra te d. I h ope th at th eir o pera to rs w ill c o lle ctiv e ly
fo rm a n in dustr y -w id e
su pport g ro up, to e xte nd th e lif e tim es o f th ose
syste m s b eyo nd th e 2 020 d eadlin e fo r
Pyth on-D ev su pport. H ow eve r,
anyo ne s ta rtin g o ut w it h P yth on s h ould c le arly le arn
Pyth on 3 a nd th at is
in cre asin gly th e c a se .
Dris co ll
: T hank y o u, S te ve H old en.

C hap te r 3 . C aro l W illin g
C aro l W illin g
is a n A m eric a n s o ftw are d eve lo per a nd fo rm er d ir e cto r o f
t h e P yth on S oftw are F oundatio n.
For th e la st se ve n ye ars , sh e has
p ro vid ed o pen s o urc e s o ftw are a nd h ard w are d eve lo pm ent
fo r W illin g
C onsu lt in g. C aro l is a g eek in re sid ence a t F ab L ab S an D ie go, a n on-
p ro fit
educa tio n c e nte r. S he is a c o re d eve lo per fo r C Pyth on a nd h elp s to
o rg aniz e b oth P yL adie s
San D ie go and th e S an D ie go P yth on U se r
G ro up. C aro l is a ls o a r e se arc h s o ftw are e ngin eer
fo r P ro je ct J u pyte r a nd
a n a ctiv e c o ntr ib uto r to o pen s o urc e P yth on p ro je cts . S he
is p assio nate
a bout te ach in g te ch a s a s p eake r a nd w rit e r.
Dis cu ssio n t h em es: C Pyth on, J u pyte r, t h e P SF.
Catc h u p w it h C aro l W illin g h ere : @ Willin gC aro l
M ik e D ris co ll
: C ould y o u g iv e m e a lit tle b ackg ro und
in fo rm atio n a bout
y o urs e lf ?
C aro l W illin g
: I am so m eone who got in vo lv e d in co m putin g in
e le m enta ry s ch ool b ack in th e 7 0s.
I a ctu ally g re w u p in th e s h adow o f
B ell L abs. In a s im ila r w ay to th e P yth on c o m munit y ,
th ey h ad o utr e ach
f o r y o ung c o ders .
T hen I h ad th e o pportu nit y in m id dle s ch ool to c o ntin ue p ro gra m min g o n

th e fir s t T R S-8 0
and a n A pple II. I a lw ays lik e d p ro gra m min g b eca use it
was a bout e xp lo rin g s o m eth in g
new . T here w as n o in te rn et th en, s o y o u
pre tty much ju st had th e so urc e co de and so m e
slim bit of
docu m enta tio n. Y ou w ere th e e xp lo re r o f th e c o m pute r, if y o u w ill. S o
it
was r e ally fu n.
Afte r th at I g ot a d egre e in
ele ctr ic a l e ngin eerin g. W hile I w as in c o lle ge, I
had th e o pportu nit y to r u n th e c a ble
te le vis io n s ta tio n o n c a m pus. I g ot to
le arn th e te ch nic a l s id e, a s w ell a s h ow to
motiv a te p eople w ho w ere
vo lu nte ers .
I re ally d id n't w ork a s a n e ngin eer u ntil a bout s ix y e ars in to m y c a re er. I
to ok a
lo ng b re ak fr o m w ork , b ut th e w hole tim e I w as d oin g th in gs lik e
build in g a L in ux
netw ork in m y h ouse . I d ecid ed th at I r e ally w ante d to g o
back a nd d o th e d eve lo pm ent
sid e, b eca use th at w as w hat re ally ro cke d
my w orld . I h ad a n o pportu nit y to w ork o n
th e J u pyte r te am a nd th at's
what I'm d oin g n ow .
Dris co ll
: H ow did yo u go fr o m bein g an ele ctr ic a l engin eer back to
pro gra m min g? I k n ow a lo t
of
e le ctr ic a l e ngin eers a re m ore h ard w are
orie nte d.
Willin g
: W ell, I still have a re al lo ve fo r hard w are and th in gs lik e
Mic ro P yth on a nd C ir c u it P yth on.
That s till in te re sts m e q uit e a b it , b ut I
lik e th e p uzzle o f p ro gra m min g.
Caro l W illin g: 'I lik e t h e p uzzle o f p ro gra m min g.'
I th in k m y fir s t lo ve w as m ath a nd a ctu ally p ro gra m min g. T he e le ctr ic a l
engin eerin g
stu ff th at I lik e d to d o w as th e d ig it a l c o m munic a tio ns th eory .
So it w as r e ally m ore
math a nd s o ftw are d eve lo pm ent th an it w as a ctu ally
th e h ard w are s tu ff .
Dris co ll
: H ow d id y o u e nd u p
usin g P yth on, in ste ad o f R uby o r s o m e
oth er la nguage?
Willin g
: W ell, I h ad d one C ++, J a va , a nd R uby in th e e arly R ails d ays.
Then w hen I w as lo okin g
se rio usly a t c o m pute r la nguages, I r e aliz e d th at

I w as a ctu ally lo okin g fo r a te ch
co m munit y th at I w ould e njo y b ein g in .
In S outh ern C alif o rn ia , w e h ave a lo t o f o pportu nit ie s fo r m eetu ps. F or a
while I
dabble d in th e L in ux c o m munit y . T hen I a ctu ally s ta rte d w ork in g
wit h so m e people fr o m
OpenH atc h on te ach in g people how to get
in vo lv e d in o pen s o urc e .
The m ore th at I p la ye d a ro und w it h P yth on, th e m ore I s ta rte d re ally
enjo yin g th e
re adabilit y o f it . P yth on m ade it e asy to g et th in gs d one a nd
th ere w ere v a st lib ra rie s
out th ere . S o th at w as m y r o ute to P yth on. It w as
a n onlin ear p ath to th e w orld o f
Pyth on, b ut a g ood p ath .
Dris co ll
: C ould yo u exp la in how yo u beca m e a co re deve lo per of
Pyth on?
Willin g
: Y es, I g ot in vo lv e d w it h
o rg aniz in g s o m e o f th e ta lk s a nd tu to ria ls
fo r P yC on s e ve ra l y e ars a go. I a tte nded,
and it w as s u rp ris in g to m e h ow
many d eve lo pers th ere w ere a t th e C Pyth on s p rin ts ,
but h ow fe w w ere
wom en.
Caro l W illin g: 'I t w as s u rp ris in g t o m e h ow m an y d evelo pers t h ere
were a t t h e C Pyth on
sp rin ts , b ut h ow f e w w ere w om en .'
Nic k C oghla n, a nd a
co uple o f o th er p eople , w ere e xp la in in g to m e h ow
th in gs w ork e d. I fe lt th at w e n eeded
bette r o utr e ach , s o I d id a lo t o f w ork
wit h th e P yth on D eve lo per's G uid e a nd a ls o
outr e ach w it h in th e P yL adie s
co m munit y . I w ork e d w it h N ic k a nd G uid o v a n R ossu m o n
how w e c o uld
bette r d ocu m ent w hat w e w ere d oin g a nd m ake it m ore a cce ssib le . S o
th at
was th e w ay th at I b eca m e a c o re d eve lo per.
Ju pyte r
r e lie s r e ally h eavily o n P yth on 3 . S o I th in k th ere 's a s tr o ng n eed
fo r v o ic e s fr o m
outs id e o f th e w eb c o m munit y to a ls o g iv e b ack to th e
co re la nguage. I th in k th at
Pyth on is a g re at la nguage a nd th ere 's s o
much o pportu nit y . E ve n th ough P yth on h as
been a ro und fo r 2 0 y e ars , I
th in k w e'v e b are ly s cra tc h ed th e s u rfa ce o f w here th is
la nguage c a n ta ke
us.

Caro l W illin g: 'E ven t h ough P yth on h as b een a ro und f o r 2 0 y ears , I
th in k w e'v e b are ly
scra tc h ed t h e s u rfa ce o f w here t h is la n guag e c an
ta ke u s.'
Dris co ll
: S o w hat p arts o f
th e lib ra ry a re y o u in c h arg e o f? W hat d o y o u
do a s a c o re d eve lo per?
Willin g
: Rig ht now , I'm mostly work in g on docu m enta tio n and
deve lo pm ent to ols g uid es. I a ls o
mento r s o m e p eople in th e c o m munit y
th at a re g ettin g s ta rte d d eve lo pin g w it h P yth on,
or C ore P yth on.
I get in vo lv e d w it h th in gs th at w e re ly heavily on in Ju pyte r, lik e
asyn ch ro nous s tu ff .
If I h ad m ore tim e th en I w ould b e m ore in vo lv e d o n
th e C Pyth on s id e. R ig ht n ow , th ough,
Ju pyte r h as b een g ro w in g in le aps
and b ounds, s o it h as k e pt u s a lit tle b usy.
I a ls o re ally lo ve g ettin g
in vo lv e d w it h e duca tio n. I th in k th at if y o u c a n
make a la nguage a cce ssib le to p eople ,
th en y o u g et lo ts o f g re at id eas.
That's p art o f th e p ow er o f a ll th e lib ra rie s th at
are o ut th ere in P yth on.
Dris co ll
: S o w hat a re y o u d oin g a t th e m om ent w it h th e P yth on S oftw are
Foundatio n ( P SF)?
Willin g
: I h ave ju st s e rv e d tw o y e ars a s a d ir e cto r o f th e P SF. R ig ht n ow ,
I'm in vo lv e d w it h
se ve ra l o f th e w ork in g g ro ups, s u ch a s m ark e tin g a nd
scie nce .
Really th is y e ar I'm
fo cu sin g m ore o n g oin g o ut a cro ss th e w orld to s p eak
and s h are . I w ant to ta lk a bout
th e s ta te o f e duca tio n s u rro undin g P yth on,
where w e a re w it h P yth on in g enera l a cro ss
many d if f e re nt d is cip lin es,
and a ls o h ow th at fit s in w it h J u pyte r. T hen I'l l a ls o
be in vo lv e d a gain w it h
PyC on a nd th e tu to ria ls . It's a ctu ally fu n to re ad a ll o f th e
pro posa ls th at
people s e nd in .
I'm r e la tiv e ly n ew to th e m ark e tin g w ork g ro up, b ut w e'r e tr y in g to e xp lo re
oth er
ways to e ngage th e c o m munit y g lo bally , a s w ell a s s p onso rs . W e
want to h ig hlig ht h ow
Pyth on is a ctu ally b ein g u se d o ut in th e r e al w orld .
The m ark e tin g gro up is tr y in g
to co m e up w it h a str o nger Tw it te r
ca m paig n, s o th at p eople h ave m ore o f a n id ea a bout
what th e P SF

does.
Mik e D ris co ll: W hat a re t h e c u rre n t g oals f o r t h e P SF?
Willin g
: T he m is sio n
o f th e P SF is to s u sta in th e P yth on la nguage it s e lf
and p ro te ct th e c o pyrig hts . T here
is a ls o a g oal to g ro w th e la nguage a nd
th e u se o f th e la nguage g lo bally in p la ce s
th at m ayb e a re n't u sin g P yth on
alr e ady.
On a ye ar-to -y e ar basis , th e goals m ay lo ok a lit tle bit dif f e re nt.
Obvio usly , ru nnin g
PyC on is v e ry im porta nt a nd w ill a lw ays b e a g oal o f
th e P SF. O th er th in gs m ay b e
more s tr a te gic , s u ch a s d ecid in g h ow w e
bala nce th e re quests fo r g ra nts th at c o m e
in , w it h o th er p ro je cts th at w e
are fu ndin g.
Anoth er th in g th at's r e ally im porta nt a cro ss a ll o f th e o pen s o urc e w orld is
th e su sta in abilit y
of p ro je cts a nd h ow yo u fu nd th e in fr a str u ctu re th at
th ese p ro je cts a re ru nnin g o n.
We'v e b een v e ry fo rtu nate in th e P SF to
have h ad s o m e w onderfu l d onors w it h in th e
co m munit y a nd s p onso rs .
But if fo r s o m e re aso n a s p onso r w ent a w ay, p eople w ould s till
exp ect
PyP I to b e u p a nd r u nnin g a nd a ls o th e w ebsit e .
You n eed to b uild a
lo ng-te rm s u sta in abilit y p la n, s o th at y o u d on't b urn
out y o ur v o lu nte ers . T he P SF
als o n eeds to p ro vid e th e le ve l o f s e rv ic e
th at p eople h ave c o m e to e xp ect. I k n ow
Donald S tu ff t h as d one a fe w
in te rv ie w s o n h ow m uch tr a ff ic P yP I ro ute s a d ay. T he
fig ure is p re tty
phenom enal. PyP I is so m eth in g th at w e all depend on. The PSF
main ta in s
th e p re se nce o f P yth on w it h in th e w orld a nd th e in fr a str u ctu re
th at y o u m ay ta ke fo r
gra nte d o n a d ay-to -d ay b asis a s a d eve lo per.
Caro l W illin g: 'T he P SF m ain ta in s t h e p re sen ce o f P yth on w it h in t h e
world a n d t h e
in fr a str u ctu re t h at y o u m ay t a ke f o r g ra n te d o n a d ay-
to -d ay b asis a s a d evelo per.'
Dris co ll
: S o, I d on't k n ow if y o u c a n ta lk a bout th is o r n ot, b ut w hat d o
yo u d o a t P ro je ct
Ju pyte r?
Willin g
: I c a n te ll y o u w hat w e d o a t
Pro je ct J u pyte r, b eca use J u pyte r is

an o pen s o urc e p ro je ct. It is fu nded w it h a s cie ntif ic
re se arc h p ro je ct
gra nts , a s w ell a s s o m e c o rp ora te d onatio ns.
There a re b asic a lly th re e m ajo r a re as w it h in J u pyte r. T here 's th e c la ssic
Ju pyte r
Note book, w hic h g re w o ut o f th e IP yth on N ote book. T here a re
als o th e m any dif f e re nt
wid gets and to ols th at in te gra te wit h th e
Note book. L astly th ere 's J u pyte rH ub, w hic h
is w hat I w ork s p ecif ic a lly o n.
Ju pyte rH ub lo oks a t h ow
y o u p ro vid e N ote books to a g ro up o f p eople in a
clu ste r. T hat co uld b e in a sm all
work sh op, o r a re se arc h la b. W e'r e
se ein g a lo t o f u se o f J u pyte rH ub w it h in la rg e
aca dem ic in stit u tio ns. A ls o ,
a lo t of th e re se arc h ers in hig h-p erfo rm ance co m putin g
are usin g
Ju pyte rH ub fo r v e ry n um eric a lly in te nsiv e p ro ce ssin g.
Caro l W illin g: 'B asic ally J u pyte rL ab w ill g iv e y o u a s tr e am lin ed ID E
fe el, w it h s o m e
nic e f u nctio nalit y .'
The n ext g enera tio n o f th e N ote book is
Ju pyte rL ab. B asic a lly , J u pyte rL ab
will g iv e y o u a s tr e am lin ed ID E fe el, w it h s o m e
nic e fu nctio nalit y . Y ou c a n
pull g ra phs o ut o f th e p age a nd h ave th em s till s yn c a nd
re fle ct w hat
ch anges a re h appenin g.
Ju pyte rL ab is b uilt to b e e xte nsib le , s o y o u c a n a dd th in gs a nd c u sto m iz e
th em . I'v e
been usin g Ju pyte rL ab pro bably fo r about a ye ar and in
dif f e re nt it e ra tio ns. T he fe edback
has b een
v e ry p osit iv e a nd J u pyte rL ab
was s h are d a t S ciP y a y e ar a go.
Dris co ll
: D o y o u n eed a
s u bscrip tio n to u se J u pyte rH ub? H ow d oes th at
work ?
Willin g
: N o, J u pyte rH ub is a ls o a fr e e o pen s o urc e p ro je ct. S o, if y o u h ad
a b are -m eta l s e rv e r,
yo u c o uld d eplo y it o n y o ur o w n s e rv e r. Y ou c o uld
ju st d eplo y Ju pyte rH ub o n A W S, A zu re ,
Google C lo ud, o r o th ers lik e
Racksp ace .
We re ce ntly p ut to geth er a g uid e to h elp p eople to s e t u p a J u pyte rH ub
deplo ym ent
usin g K ubern ete s. T hat is a ctu ally w ork in g o ut re ally n ic e ly .
There a re m ult ip le m eth ods
fo r th e auth entic a tio n of use rs , beca use

th ere 's a lo t of va ria bilit y in how dif f e re nt
aca dem ic in stit u tio ns
auth entic a te p eople .
Caro l W illin g: 'Y ou c an p ro vid e e very s tu den t w it h a w eb a cco unt
an d t h ey w ill h ave
all o f t h e s am e t o ols a n d t h e s am e e xp erie n ce.'
You w ant so m eth in g th at w e ca ll a sp aw ner, w hic h w ill sp aw n an
in div id ual Ju pyte r
Note book in sta nce fo r a pers o n. That's why
Ju pyte rH ub is a ttr a ctiv e to u niv e rs it ie s.
You c a n p ro vid e e ve ry s tu dent
wit h a w eb a cco unt a nd th ey w ill h ave a ll o f th e s a m e
to ols a nd th e s a m e
exp erie nce . Y ou d on't h ave to d eal w it h in sta lla tio n n ig htm are s.
Dris co ll
: D o y o u w ork o n IP yth on
a s w ell?
Willin g
: IP yth on is p art o f th at w hole J u pyte r p ro je ct, b ut th e w ork th at I
do o n IP yth on
it s e lf is m in im al. I w ill o cca sio nally h elp th em to tr y o ut n ew
re le ase s.
Ju pyte r is all one big aca dem ic re se arc h pro je ct. W e don't have an
ove ra bundance o f
mark e tin g re so urc e s, b ut w e'r e tr y in g to s p re ad th e
word . O ne o f th e th in gs th at I
th in k is r e ally p ow erfu l a bout J u pyte r is th at
yo u c a n s h are in fo rm atio n in s u ch a
way th at p eople c a n in te ra ct w it h it
easily . I'v e c e rta in ly s e en s tu dents r e ally g ra vit a te
to w ard s J u pyte r.
Dris co ll
: S o w hat d o y o u lik e a bout
th e P yth on c o m munit y ?
Willin g
: I th in k B re tt C annon
a nd o th er p eople h ave s a id b efo re th at y o u
co m e fo r th e pro gra m min g la nguage, but
yo u sta y fo r th e Pyth on
co m munit y . T hat re ally re so nate s. In th e te ch w orld , I d on't
kn ow o f a ny
co m munit y th at's b een m ore w elc o m in g th an th e P yth on c o m munit y .
Caro l W illin g: 'Y ou c o m e fo r th e p ro gra m min g la nguage, b ut y o u s ta y fo r
th e P yth on
co m munit y .'
So m any th oughtfu l and ta le nte d people are w illin g to sh are th eir
kn ow le dge a nd id eas.
I th in k th at a lo t o f th at c o m es fr o m G uid o h im se lf
and h is w illin gness to h ave a
la nguage th at's e asy to u se a nd e asy to
re ad. G uid o a ls o e nco ura ges p eople a nd a nsw ers
questio ns b eca use h e

wants a h ealt h y P yth on c o m munit y , a s w ell a s a h ealt h y la nguage.
I th in k
th at is r e ally im porta nt.
Caro l W illin g: 'G uid o a ls o e n co ura g es p eo ple a n d a n sw ers
questio ns b ecau se h e w an ts
a h ealt h y P yth on c o m munit y , a s w ell
as a h ealt h y la n guag e.'
I th in k it 's fu n to s e e a ll o f th e d if f e re nt th in gs th at p eople a re d oin g. A s
much
as I lo ve P yC on, I re ally lo ve th e re gio nal co nfe re nce s. T hat's
where y o u re ally s e e
th e n ew s tu ff th at is h appenin g. Y ou g et d if f e re nt
people 's p ers p ectiv e s a nd fin d
out w hat th ey a re u sin g P yth on fo r.
There 's n oth in g lik e tr y in g to te ach n ew u se rs h ow to d o s o m eth in g, to
make yo u re aliz e
th at P yth on n eeds to im pro ve th e u se r e xp erie nce
so m ew here . A s a deve lo per, it 's not
ple asa nt fo r m e, so fo r a new
le arn er, w ho d oesn 't n ece ssa rily k n ow if th eir th in g
is c o nfig ure d c o rre ctly ,
it 's e ve n m ore u nple asa nt.
Dris co ll
: W hat is e xcit in g y o u
a bout P yth on a t th e m om ent?
Willin g
: I th in k y o u'v e g ath ere d fr o m o ur c o nve rs a tio n s o fa r th at m y
in te re sts a re n ot r e la te d
to ju st o ne th in g.
One o f th e n ic e th in gs a bout P yth on is th at I c a n u se th e la nguage if I'm
doin g e m bedded
stu ff , w eb s tu ff , s cie ntif ic d eve lo pm ent, o r a naly sis . I
ca n c e rta in ly u se P yth on
fo r te ach in g k id s o r a dult s . T here a re n't a w hole
lo t o f la nguages th at I c a n s a y
are r e ally s tr o ng a cro ss th e b oard o n a ll o f
th ose th in gs. I th in k th at P yth on r e ally
exce ls th ere .
Caro l W illin g: 'L earn in g a n d e d ucatio n a re w hat e xcit e m e a b out
Pyth on. P yth on 3 is
a p le asu re t o u se f o r t e ach in g.'
Learn in g a nd e duca tio n a re w hat e xcit e m e a bout P yth on. P yth on 3 is a
ple asu re to
use fo r te ach in g a nd f- s tr in gs h ave g re atly s im plif ie d s tr in g
fo rm attin g. M ic ro P yth on,
Cir c u it P yth on, R asp berry Pi, m ic ro :b it , and
Ju pyte r h ave in sp ir e d m ore y o ung p eople
to m ake s o m e r e ally in te re stin g

pro je cts . It w as g re at fu n to s e e th e y o ung d eve lo pers
at P yC on U K fa r
exce ed o ur e xp ecta tio ns w it h th eir p ro je cts a nd lig htn in g ta lk s.
Dris co ll
: S o, a s a co re d eve lo per o f P yth on, w here d o yo u se e th e
la nguage g oin g in th e fu tu re ?
Willin g
: I th in k w e'r e g oin g to c o ntin ue to s e e g ro w th in th e s cie ntif ic
pro gra m min g p art
of P yth on. S o th in gs th at s u pport th e p erfo rm ance o f
Pyth on a s a la nguage a nd a syn c
sta bilit y a re g oin g to c o ntin ue to e vo lv e .
Beyo nd th at, I th in k th at P yth on is a p re tty
pow erfu l a nd s o lid la nguage.
Eve n if y o u s to pped d eve lo pm ent to day, P yth on is a
darn g ood la nguage.
I th in k th at th e n eeds o f th e P yth on c o m munit y a re g oin g to fe ed b ack
in to P yth on
and in flu ence w here th e la nguage g oes. It's g re at th at w e
have more re pre se nta tio n
fr o m dif f e re nt gro ups wit h in th e co re
deve lo pm ent te am . S m arte r m in ds th an m in e co uld
pro vid e a bette r
answ er to y o ur q uestio n. I'm s u re th at G uid o h as s o m e th in gs in m in d
fo r
where h e w ants to s e e P yth on g o.
Caro l W illin g: 'A b ette r s to ry in m obile is d efin it e ly n eed ed . B ut y o u
kn ow , if t h ere 's
a n eed t h en P yth on w ill g et t h ere .'
Mobile d eve lo pm ent h as b een a n A ch ille s' h eel fo r P yth on fo r a lo ng
tim e. I'm h opin g
th at s o m e o f th e B eeW are s tu ff is g oin g to h elp w it h th e
cro ss-c o m pila tio n. A b ette r
sto ry in m obile is d efin it e ly n eeded. B ut y o u
kn ow , if th ere 's a n eed th en P yth on
will g et th ere .
I th in k th at th e la nguage is g oin g to c o ntin ue to m ove to w ard s th e s tu ff
th at's in
Pyth on 3. S om e big co de base s, lik e In sta gra m , have now
tr a nsit io ned fr o m P yth on 2
to 3 . W hile th ere is m uch P yth on 2 .7 c o de s till
in pro ductio n, gre at str id es have
been m ade by In sta gra m , as th ey
sh are d in th eir P yC on 2 017 k e yn ote .
Caro l W illin g: 'I t w ill v ary b y c o m pan y, b ut a t s o m e p oin t, b usin ess
need s, s u ch a s
secu rit y a n d m ain ta in ab ilit y , w ill s ta rt d riv in g g re ate r
mig ra tio n t o P yth on 3 .'

There 's m ore to olin g
aro und P yth on 3 a nd m ore te stin g to ols , s o it 's le ss
ris ky fo r co m panie s to m ove so m e
of th eir le gacy co de to P yth on 3 ,
where it m ake s b usin ess s e nse to . It w ill v a ry b y
co m pany, b ut a t s o m e
poin t, b usin ess n eeds, su ch a s se cu rit y a nd m ain ta in abilit y ,
will sta rt
driv in g g re ate r m ig ra tio n to P yth on 3 . If y o u'r e s ta rtin g a n ew p ro je ct,
th en
Pyth on 3 is th e b est c h oic e . N ew p ro je cts , e sp ecia lly w hen lo okin g a t
mic ro se rv ic e s
and A I, w ill fu rth er d riv e p eople to P yth on 3 .
Dris co ll
: W hy d o y o u th in k th at P yth on is b ein g u se d s o m uch fo r A I a nd
mach in e le arn in g?
Willin g
: T he lo ng h is to ry o f
Pyth on b ein g u se d in scie nce a nd d ata
scie nce m ake s P yth on a n e xce lle nt c h oic e fo r
AI. T he ric h e co syste m o f
Pyth on lib ra rie s, in clu din g
scik it - le arn , N um Py, pandas, and Ju pyte r,
giv e s r e se arc h ers a nd c re ato rs a s o lid
fo undatio n fo r g ettin g w ork d one.
Caro l W illin g: 'T he lo ng h is to ry o f P yth on b ein g u sed in s cie n ce a n d
data s cie n ce
makes P yth on a n e xcelle n t c h oic e f o r A I.'
Dris co ll
: H ow c o uld P yth on b e a b ette r la nguage fo r A I?
Willin g
: S usta in in g th e e xis tin g
Pyth on in fr a str u ctu re a nd k e y lib ra rie s is
crit ic a l fo r th e fu ndam enta l g ro w th o f
Pyth on. A h ealt h y a nd in clu siv e
eco syste m , a nd c o rp ora te fu ndin g fo r s u sta in abilit y ,
will h elp to c o ntin ue
th e r a pid g ro w th o f A I, d eep le arn in g, a nd m ach in e le arn in g.
Dris co ll
: A re th ere a ny c h anges th at y o u h ope to s e e in
fu tu re P yth on
re le ase s?
Willin g
: I w ould lo ve to s e e m ore ta sk-o rie nte d d ocu m enta tio n to s u pport
th e c o ncu rre ncy,
asyn c, p ara lle lis m , a nd d is tr ib ute d p ro ce ssin g. W e h ave
had s o m e w onderfu l e nhance m ents
in th e p ast fe w r e le ase s, a nd it w ould
be fa nta stic to h elp o th ers to m ore e asily
use th ese e nhance m ents .
Dris co ll
: T hank y o u, C aro l W illin g.

C hap te r 4 . G ly p h L efk o w it z
G ly p h L efk o w it z
is a n A m eric a n s o ftw are e ngin eer w ho h as w ork e d o n
n um ero us o pen s o urc e p ro je cts .
Pre vio us ro le s in clu de s e nio r s o ftw are
e ngin eer at A pple , and to day he w ork s at P ilo t.c o m ,
a bookke epin g
s e rv ic e fo r s ta rt- u ps. G ly p h is th e o rig in al fo under o f T w is te d, a n etw ork
p ro gra m min g fr a m ew ork w rit te n in P yth on. H e co ntin ues to m ain ta in
T w is te d a nd p la y
an a ctiv e r o le in th e T w is te d c o m munit y . In 2 009, G ly p h
w as m ade a fe llo w o f th e P yth on
Softw are F oundatio n (P SF). T he P SF
a w ard ed G ly p h it s C om munit y S erv ic e A w ard fo r co ntr ib utio ns
to th e
P yth on la nguage in 2 017.
Dis cu ssio n t h em es:
v2.7 /v 3.x , P yth on's f u tu re , d iv ers it y .
Catc h u p w it h G ly p h L efk o w it z h ere : @ gly p h
M ik e D ris co ll
: S o
h ow d id y o u e nd u p b eco m in g a p ro gra m mer?
G ly p h L efk o w it z
: W ell, m y p ro gra m min g p ath w as s o m ew hat c ir c u it o us.
I s ta rte d o ff p ro gra m min g a s
a k id , b ut I d o n ot h ave th e s te re oty p ic a l
s to ry o f le arn in g B ASIC , th en P erl. T here
wasn 't a lin ear p ro gre ssio n, o r
s o m e p ro fe ssio nal a sp ir a tio n th at I h ad to d o p ro gra m min g.
I ju st w ante d to m ake g am es lik e Z ork w hen I w as a k id . M y d ad is a
p ro fe ssio nal p ro gra m mer,
so h e tr ie d to te ach m e A PL. I d id n ot ta ke to

pro gra m min g q uic kly . I le arn ed h ow
to a ssig n v a ria ble s a nd th at w as it . I
had n o id ea w hat v a ria ble a ssig nm ent m eant.
That w as w here I s ta ye d
fo r a bout fiv e y e ars .
Then I le arn ed
Hyp erC ard a nd I s ta rte d to g et th e n otio n o f c o ntr o l flo w
and lo ops. I tr ie d to m ake
vid eo g am es w it h it . T he w hole tim e, fo r m y
entir e c h ild hood, I w as tr y in g to a vo id
le arn in g to p ro gra m . I w as a lw ays
lo okin g fo r n on-p ro gra m mer s tu ff to d o, b eca use
I w as te rrib le a t m ath .
Gly p h L efk o w it z : 'T he w hole t im e, f o r m y e n tir e c h ild hood, I w as
tr y in g t o a vo id le arn in g
to p ro gra m .'
So a fte r a w hile , H yp erC ard s o rt o f g ot lim it in g. I g ot S uperC ard a nd a t
so m e p oin t,
I le arn ed w hat a v a ria ble w as a nd h ow to m ake p ro gra m s
th at w ould a ctu ally o pera te
on d ata s tr u ctu re s. T hen I le arn ed C ++. O nce
I u nders to od th e p ow er in here nt in p ro gra m min g,
afte r y e ars o f tr y in g to
avo id it , th en I r e ally g ot in to it .
Gly p h L efk o w it z : 'O nce I u nders to od t h e p ow er in here n t in
pro gra m min g, a fte r y ears
of t r y in g t o a vo id it , t h en I r e ally g ot in to
it .'
I le arn ed J a va , I le arn ed P erl, I le arn ed L is p a nd I le arn ed S ch em e, a ll in
hig h s ch ool.
I ta ught a p ro gra m min g c la ss a t m y h ig h s ch ool, s o I g ot
re ally in to it b y th e tim e
I w as a bout 1 7 . B ut it w as q uit e a s lo g o n th e w ay
up th ere .
Dris co ll
: S o how did th at end up push in g yo u
fr o m all th ose oth er
la nguages in to P yth on?
Lefk o w it z
: W ell, b y th e tim e I s ta rte d m y p ro fe ssio nal c a re er, I'd s o rt o f
se ttle d o n J a va .
I had so m e re ally te rrib le exp erie nce s w it h th e pro prie ta ry ru ntim e,
partic u la rly
fo r m acO S, th at sh ip ped w it h Ja va . S o I h ad p ro fe ssio nal
exp erie nce w it h th e r u ntim es
bein g r e ally b ad. B asic a lly , th ere w as a b ug

in th e w in dow in g s yste m th at th e a pplic a tio n
I w as w ork in g o n k in d o f
le aned o n.
The a pplic a tio n co uld n ot b e re arc h it e cte d to a vo id tic klin g th is b ug,
beca use th e
bug w as c o nnecte d w it h le akin g la rg e a m ounts o f m em ory .
So e ff e ctiv e ly th e p ro je ct
th at I w as o n d ie d a nd I lo st th e jo b. I e nded u p
bein g unem plo ye d fo r a co uple of
month s and as a re su lt of th at
exp erie nce I th ought w ell, s cre w J a va , I'm n ot d oin g
th at a nym ore , m ain ly
beca use o f th e r u ntim e is su es.
Gly p h L efk o w it z : 'I e n ded u p b ein g u nem plo yed f o r a c o uple o f
month s a n d a s a r e su lt
of t h at e xp erie n ce I t h ought w ell, s cre w
Java.'
My v e ry fir s t re actio n w as to s e e w hat G NU h ad o n o ff e r fo r a J a va
co m pile r. I th ought
mayb e I c o uld d o J a va , b ut n ot to uch th e r u ntim e s tu ff ,
beca use it w as ju st to o b uggy.
The c o nclu sio n fr o m th at w as ra pid ly th at
none o f th at s tu ff w ork e d.
So a t th e s a m e tim e, m y h obby p ro je ct, w hic h d oes e xis t to th is d ay, w as
th is o nlin e
te xt- b ase d g am e w hic h I h ad w rit te n in J a va . A tr e m end ous
am ount o f th e w ork th at
I h ad d one in J a va w as b uild in g u p th ese h ash
ta ble s fu ll o f o bje cts w it h r u n m eth ods.
There w ere th en a rg um ents to th e r u n m eth ods, w hic h I w ould in je ct in to
th em w it h
re fle ctio n. T he w hole id ea w as th at y o u w ere s u ppose d to w ir e
th e g am e to geth er a t
ru ntim e. It w as k in d o f
use r-p ro gra m mable , b ut in a
more r e str ic te d w ay.
Dris co ll
: S o h ow d id th is g am e w ork ?
Lefk o w it z
: Y ou w ould h ave a s e t o f b uild in g b lo cks th at w ere s o m ew hat
co nstr a in ed, so th at
if yo u m ade so m eth in g, it co uld have gam e
co nse quence s a nd n ot ju st fla vo r te xt th at
it w ould p rin t. S o a lm ost a ll o f
th e c o de in th e J a va v e rs io n w as th is tr e m endous
am ount o f c e re m ony,
asso cia te d w it h d yn am ic a lly c o m posin g o bje cts , o ut o f o th er o bje cts
th at
mig ht b e a rb it r a ry c o lle ctio ns.

I re im ple m ente d th e w hole th in g in P yth on a nd I re aliz e d th at y o u d id n't
need to d o
any o f th at s tu ff . O bje cts in P yth on w ere ju st th ese d yn am ic
co lle ctio ns of th in gs,
th at yo u co uld arb it r a rily add attr ib ute s to and
re tr ie ve a ttr ib ute s fr o m . Y ou c o uld
lo ok in to o th er d ic ts a nd a ll th at s tu ff .
Gly p h L efk o w it z : 'I r e im ple m en te d t h e e n tir e t h in g, w hic h w as a b out
25,0 00 lin es o f
Java in 8 00 lin es o f P yth on, a n d I t h ought it w as a
much b ette r p ro gra m .'
So I re im ple m ente d th e e ntir e th in g, w hic h w as a bout 2 5,0 00 lin es o f
Ja va in 8 00 lin es
of P yth on, a nd I th ought it w as a m uch b ette r p ro gra m .
Now g ra nte d, w hat I h ad im ple m ente d
in J a va w as a c ru m my v e rs io n o f
th e P yth on o bje ct m odel, s o it w as p artic u la rly e asy
to im ple m ent.
One o f m y in te re sts th at h as e ndure d o ve r m any y e ars is c o m posa bilit y
and th e a bilit y
to a uto m atic a lly a sse m ble . I w ant th e a bilit y to m ake
pro gra m s se lf - s ym metr ic , so
th at yo u ca n have a la rg e num ber of
im ple m enta tio ns o f th e s im ila r in te rfa ce a nd c o m pose
th em a uto m atic a lly .
Pyth on's m eta pro gra m min g fa cilit ie s w ere in th is w onderfu l s w eet
sp ot
betw een sa y L is p o r S ch em e, w here th ere w as so m uch p ow er th at
noth in g w as co m patib le .
No tw o p eople w ould w rit e th e sa m e o bje ct
model in th ose la nguages.
At th e oth er end, wit h so m eth in g lik e Ja va , eve ry th in g was ve ry
sta ndard iz e d, b ut
it d id n't m atte r, b eca use e ve ry th in g w as a ls o re ally
te dio us. Y ou c o uld n't a uto m atic a lly
pull th in gs to geth er a nd e ve ry th in g
was v e ry v e rb ose , s o it w asn 't w orth tr y in g to
do a ny m eta pro gra m min g.
Pyth on is s ta ndard e nough th at th in gs w ork to geth er, b ut fle xib le a nd
hig h-le ve l e nough
th at y o u g et a lm ost a s m uch p ow er a s L is p m acro s. S o
th at's w hy I'v e s tu ck w it h it
eve r s in ce , a lt h ough b eca use I k n ow a b unch
of oth er la nguages, I perio dic a lly ve ntu re
in to th em . B ut P yth on is
defin it e ly m y m ain la nguage th at I'v e b uilt m y c a re er o n.
Gly p h L efk o w it z : 'P yth on is d efin it e ly m y m ain la n guag e t h at I'v e
built m y c are er
on.'

Dris co ll
: A re yo u a ctu ally a co re P yth on d eve lo per? I w asn 't a ble to
dis co ve r th at in fo rm atio n.
Lefk o w it z
: I'm n ot. I h ave a tte nded a b unch o f c o re P yth on d eve lo per
eve nts , b eca use T w is te d
is a
pre tty h ig h-p ro file P yth on p ro je ct.
I w ent to a la nguage s u m mit a c o uple o f y e ars a go a nd I h ave tr ia ge
perm is sio ns o n
th e b ug tr a cke r. I'm o n th e P yth on se cu rit y re sp onse
te am to p ro vid e a lib ra ry p ers p ectiv e
on th is s tu ff . I a ls o w ork e d w it h
Guid o v a n R ossu m a fa ir a m ount o n a syn cio g ettin g
in te gra te d in to th e
sta ndard lib ra ry . For in sta nce , pro vid in g fe edback on th at and
th e
exp erie nce s I'v e h ad w it h T w is te d.
So I'm p erip hera l to P yth on c o re d eve lo pm ent, b ut n ot a m em ber o f th e
co re te am . I
neve r re ally had th e desir e to get in vo lv e d. I basic a lly
alr e ady s p end w ay m ore tim e
th an I p ro bably s h ould d oin g v o lu nte er
open s o urc e d eve lo pm ent, to b e a ddin g to th at
by d oin g P yth on c o re
stu ff . A lo t o f p eople u se P yth on p ro fe ssio nally a nd w ant to
giv e b ack, b ut
I a lr e ady g iv e b ack.
Dris co ll
: S o, n ow w e'r e ta lk in g a bout T w is te d, c o uld y o u te ll m e a bout
how T w is te d c a m e a bout
and w hat in sp ir e d y o u to w rit e it ?
Lefk o w it z
: W ell, it c a m e
a bout o rig in ally b eca use o f th at v e ry s a m e v id eo
gam e th at I
was te llin g y o u a bout b efo re . I s ta rte d o ff in P yth on re w rit in g
th e J a va v e rs io n o f
th e s e rv e r th at I h ad b een w ork in g o n.
The co ncu rre ncy of th at se rv e r w as ve ry heavily base d on th re ads,
beca use th ere were
mult ip le pla ye rs walk in g aro und and m ult ip le
auto nom ous a gents d oin g v a rio us th in gs.
So th ere w as ju st a b ig m ess o f
th re ads in Ja va . There w as no oth er w ay to do it and
th e w hole
eco syste m w as k in d o f o rie nte d a ro und u sin g lo ts o f th re ads.
Gly p h L efk o w it z : 'T here w as a t im e... w hen t h e t e rm m assiv ely
mult it h re ad ed w as lik e
a b oast t h at p ro je cts w ould m ake.'
In fa ct, I'l l n eve r fo rg et th is , th ere w as a tim e, in th e la te 1 990s a nd v e ry
early
2000s, w hen
massiv e ly m ult it h re aded
w as lik e a b oast th at p ro je cts

would m ake . T his w as s o m eth in g p osit iv e th at th ey
were c la im in g a bout
th eir p ro je ct.
We h ad a s im ila r ty p e o f a rc h it e ctu re a nd it w as a g ia nt m ess. T here
were to ns a nd
to ns o f h orrib le b ugs th at w ere th e re su lt o f th e in co rre ct
managem ent o f th re ads.
I d on't re m em ber e xa ctly h ow I d is co ve re d it ,
but b asic a lly o rig in ally th ere w ere
th re e th re ads fo r e ve ry c o nnectio n: th e
re ader th re ad, th e w rit e r th re ad a nd th e lo gic
th re ad.
My fr ie nd J a m es K nig ht r e w ro te th e c lie nt/s e rv e r p ro to co l fo r th is g am e. I
belie ve
th at w hen h e r e w ro te it , h e c o ndense d d ow n th ose th re e th re ads
in to a s in gle th re ad
per p la ye r, b y u sin g th e s e le ct m odule .
Dris co ll
: W hat d id th is d eve lo pm ent m ean fo r y o u?
Lefk o w it z
: I lo oke d a t th e c lie nt/s e rv e r p ro to co l a nd I re aliz e d th at th ere
were m ult ip le th in gs
I w ante d to k n ow a bout, th at I m ig ht b e a ble to d o
wit h a s o cke t.
Gly p h L efk o w it z : 'O nce I f o und o ut a b out t h e s ele ct m odule , I r e ad
ab out it a n d it
co m ple te ly c h an ged m y c o ncep tio n o f h ow p ro gra m s
work ed .'
So o nce I fo und o ut
a bout th e
select
m odule , I re ad a bout it a nd it
co m ple te ly ch anged m y co nce ptio n of how pro gra m s w ork e d.
As I
mentio ned b efo re , m y e arly in tr o ductio n to p ro gra m min g w as H yp erC ard ,
so I h ad
th is in tu it iv e n otio n th at th e c o m pute r is id le a nd w ait in g fo r
so m eth in g to h appen.
Dris co ll
: W here d id y o u g o fr o m th ere ?
Lefk o w it z
: S o, a fte r m essin g a ro und w it h th e
select
m odule fo r a d ay o r
tw o, I r e aliz e d th at y o u c o uld h ave s o m eth in g th at w as o n d ata
re ce iv e d,
or o n c o nnectio n s ta rte d, a nd d o s o m eth in g.
That w as m uch m ore n atu ra l to m e, b eca use I h ad b een u sin g th re ads to
so rt o f e m ula te
th is , b ut n eve r fe lt r e ally c o m fo rta ble . A t th at tim e, I d id n't
have a good in tu it io n
about w hat happened w hen w e sta rte d up a

pro gra m . It s ta rte d th re ads in th e b ackg ro und,
or s o m eth in g c o ncu rre nt
was h appenin g, b ut I d id n't r e ally u nders ta nd h ow th e p ara lle lis m
work e d.
Wit h
select
, y o u c o uld s e e th e p ara lle lis m b eca use m ult ip le c o nnectio ns
would co m e in . T hen th ere
would ju st b e m ult ip le o bje cts th at I h ad
in sta ntia te d a nd th at h ad m eth ods o n th em ,
whic h I w as c a llin g fr o m th is
eve nt lo op. S o b uild in g th at u p fr o m th e b otto m g ave
me a m uch b ette r
unders ta ndin g o f h ow c o ncu rre ncy w ork e d.
Fro m th ere , th e id ea w as th at th e g am e w ould b e w hat th ese d ays y o u
ca ll an alt e rn ate
re alit y gam e. It w ould be re ach in g out via va rio us
pro to co ls to se nd yo u e m ails o r
se nd yo u te xt m essa ges. T his re ally
date s th e w hole th in g, b eca use th e w eb s e rv e r
was n ot th e fir s t th in g I d id
and it w as n ot r e ally c le ar th at th e w eb th in g w as g oin g
to c a tc h o n.
Gly p h L efk o w it z : 'T he w eb w as ju st a r e ally s lo w a n d b uggy n ativ e
clie n t t h at c ra sh ed
a lo t.'
For u s, th e T w is te d d eve lo pm ent te am , th e w eb w as ju st a re ally s lo w
and b uggy n ativ e
clie nt th at c ra sh ed a lo t. W e c o uld w rit e n ativ e c lie nts in
Pyth on th at w ould d o e xa ctly
what w e w ante d. S ecu rit y , o f c o urs e , w as
not n early th e co nce rn th at it is to day,
so it w asn 't a s cle ar th at w e
needed s a ndboxin g. T o b e fa ir , b ro w se r s e cu rit y w as
als o te rrib le a t th e
tim e, b ut it w as n ot lik e w e w ere r e ally th in kin g a bout th at.
So th at's h ow
th e p ro je ct g ot b uilt u p in to th e m ult i- p ro to co l H yd ra th at it is .
One o f th e r e aso ns th at T w is te d
e xis te d in th e fo rm w here it h ad th is b ig
sta ndard lib ra ry b uilt in , w as th at w e
re ally w ante d d eve lo pers to re w rit e
th eir p ro to co ls in s u ch a w ay th at y o u d id n ot
need th re ads to s p eak to
th em . I s till fe el th is w ay to a la rg e e xte nt to day.
Dris co ll
: W hat le sso ns d id y o u le arn
fr o m th e fir s t T w is te d r e le ase s?
Lefk o w it z
: W ell, o ne le sso n w as th at e ach tim e yo u m ade a n o bje ct
pers is te nt, y o u w ere b asic a lly
makin g a v o w to s u pport it fo r th e re st o f
yo ur n atu ra l lif e .

Gly p h L efk o w it z : 'O ne le sso n w as t h at e ach t im e y o u m ad e a n
obje ct p ers is te n t, y o u
were b asic ally m akin g a v o w t o s u pport it f o r
th e r e st o f y o ur n atu ra l lif e .'
So w e had all of th ese re a lly cru m my lit tle cla sse s th at w ere dum b
im ple m enta tio n
deta ils . T hey w ere e xa ctly th e k in d o f th in g y o u w ould
im agin e if y o u g ot a b unch
of b ore d 1 9-y e ar-o ld s to w rit e a b unch o f
pro ductio n-c rit ic a l s e rv e r in fr a str u ctu re .
That's w hat w e w ere d oin g a nd
we e nded u p c re atin g th is v e ry o dd s it u atio n w here w e
had th ese s e rv e r
file s w hic h w ere lik e d oze ns o f d ead o bje cts fr o m p re vio us v e rs io ns
of th e
so ftw are .
We d id n't k n ow th e file s w ere in th ere b eca use
pickle
h as n o w ay to
vis u aliz e y o ur o bje ct g ra ph, o r s h ow y o u w hat's g oin g o n. S o th e m ain
web s e rv e r fo r T w is te dm atr ix .c o m , u p u ntil a ro und 2 009, w as th is 4 5 M B
pickle
file . W e d id n't k n ow w hy it w as s o b ig , b ut th at w as h ow y o u w ould
ru n it . Y ou w ould
ju st fir e u p a P yth on in te rp re te r to ru n th e re acto r. W e
were liv in g fiv e to te n y e ars
in th e fu tu re , b ut th at w asn 't n ece ssa rily
alw ays a g ood th in g.
Dris co ll
: W hat p ro ble m s d id y o u r u n in to ?
Lefk o w it z
: W e w ere s o m etim es tr y in g to d o th in gs th at w ere re ally b ad
decis io ns, b eca use th ere
was n o to olin g a sso cia te d w it h th em .
There w as n o s u pportin g e co syste m , s o w e a ssu m ed th at w e c o uld d o
so m eth in g a lt e rn ativ e
th at w as n ot k e epin g a ll o f o ur c o nfig a nd p la in te xt
file s. W e th ought w e c o uld th en
so m ehow h andw ave a ll th e b enefit s o f
ve rs io n c o ntr o l a nd te xt d if f in g, a nd a ll th e
lo g p ro ce ssin g to ols w ould
so m ehow a rriv e in o ur e co syste m , b ut th ey n eve r d id . S o
we'v e b een
tr y in g to d o le ss w eir d fo r th e s a ke o f w eir d in th e la st fiv e to te n y e ars
of
th e p ro je ct, w hic h is s till le ss th an h alf it s lif e tim e.
Gly p h L efk o w it z : 'W e'v e b een t r y in g t o d o le ss w eir d f o r t h e s ake o f
weir d in t h e
la st f iv e t o t e n y ears o f t h e p ro je ct.'
Dris co ll
: S o y o u m entio ned th at y o u w ere h elp in g w it h th e
asyncio
a nd

oth er lib ra ry c h anges re la te d to th at. H ow d o y o u s e e th ose c h anges
aff e ctin g
Tw is te d?
Lefk o w it z
: I a ctu ally w ro te a n a rtic le
o n m y b lo g a bout th is a w hile b ack.
At th e tim e, a vo ca l m in orit y of P yth on use rs ,
who re ally did n't lik e
Tw is te d to b egin w it h , so rt o f re jo ic e d th at th e lib ra ry ch anges
would
fin ally k ill T w is te d, b eca use th ere w ould b e n o r e aso n to u se it a nym ore .
Gly p h L efk o w it z : 'A v o cal m in orit y o f P yth on u sers , w ho r e ally d id n't
lik e T w is te d
to b eg in w it h , s o rt o f r e jo ic ed t h at t h e lib ra ry c h an ges
would f in ally k ill T w is te d .'
What I p re dic te d a t th e tim e, a nd I th in k th is p re dic tio n h as la rg ely b orn e
out, w as
th at sa nctio nin g eve nt- d riv e n co ncu rre ncy in th e sta ndard
lib ra ry , a nd s a yin g th is
is th e w ay th at P yth on d oes c o ncu rre ncy, w ould
pro m pt a lo t o f n ew in te re st in T w is te d.
The w hole P yth on s ta ck h as r e ally b een c o nve rg in g o n th is id ea o f e ve nt-
driv e n c o ncu rre ncy
bein g th e rig ht w ay to d o th in gs. P re vio usly , T w is te d
had to b e a g ood s e rv e r fr a m ew ork
th at y o u c o uld u se to d eplo y y o ur
applic a tio ns. It a ls o h ad to b e a g ood G UI c lie nt
fr a m ew ork , th at yo u
co uld u se to w rit e d ir e ct lin e a pps a nd d eskto p a pps.
Tw is te d needed to be a so lid im ple m enta tio n of a bunch of desig n
patte rn s, b ut it
als o h ad to b e it s o w n lit tle s ta ndard lib ra ry . It h ad to p aper
ove r a b unch o f is su es
in th e P yth on s ta ndard lib ra ry th at h ad a re ally
slo w re le ase cycle and yo u co uld n't
nece ssa rily depend on fo r th e
applic a tio ns.
Gly p h L efk o w it z : 'T his t o ol a p peare d t o b e p ro sely tiz in g t o t h em
befo re it w as s o lv in g
th eir p ro ble m s.'
The s o rt o f b re akin g p oin t th at T w is te d r e ach ed, w as th at it a ls o h ad to b e
th is m esse nger
fo r eve nt- d riv e n netw ork in g. P eople w ould co m e to
Tw is te d w antin g s o m e fe atu re , a nd
th en y o u w ould fir s t h ave to s e ll th em
on th e id ea th at a syn c w as a g ood id ea a t a ll.
What th is re su lt e d in w as

th at p eople w ould s h ow u p to T w is te d w it h n o s h are d e xp ecta tio ns
and
no b ackg ro und. T his to ol a ppeare d to b e p ro se ly tiz in g to th em b efo re it
was s o lv in g
th eir p ro ble m s.
In o rd er to liv e in th e T w is te d e co syste m to s o m e e xte nt, to g et th e re al
benefit s
of it , y o u w ould h ave to s ta rt c o nve rtin g y o ur c o de o ve r to th is
asyn c m odel, a nd
th at w as a b unch o f w ork . If y o u d id n't k n ow h ow it
work e d a nd it w asn 't in tu it iv e
to y o u, it w ould b e b aff lin g. Y ou w ould n ot
be in a fr a m e o f m in d w here y o u'd b e in te re ste d
in h earin g a bout it .
So th e in te re stin g th in g is th at e ve n p eople w ho a re s tu ck o n P yth on 2 .7 ,
and w ill
be fo r th e n ext d eca de, s h ow u p to T w is te d n ow adays.
Dris co ll
: W hy a re p eople s tu ck o n P yth on 2 .7 ?
Lefk o w it z
: P eople k in d o f
k n ow th at th e s ta ndard lib ra ry , lik e P yth on, h as
move d o n. It's a ll e ve nt- d riv e n
now , it 's a ll a syn c, a nd th ey c a n't u se
asyncio
b eca use th ey'r e in a la rg e c o rp ora te c o de b ase .
In it ia lly th e tr a nsit io n fr o m Pyth on 2 to Pyth on 3 was, fr a nkly ,
mis m anaged. T he c o re
te am , d esp it e w arn in gs fr o m c o nce rn ed u se rs lik e
myse lf , ju st d id n't co m pre hend th e
sca le o f th eir o w n cre atio n. T hey
undere stim ate d th e m ig ra tio n e ff o rt b y s e ve ra l o rd ers
of m agnit u de.
Gly p h L efk o w it z : 'I n it ia lly t h e t r a n sit io n f r o m P yth on 2 t o P yth on 3
was, f r a n kly ,
mis m an ag ed .'
The lo ng lif e of Pyth on 2 is a co nse quence of th eir re sp onsib le
managem ent o f th at
mis ta ke . T he P yth on d eve lo pm ent te am s a w th at
use rs w ere n ot u pgra din g, a nd w ork e d
hard to u nders ta nd w hy a nd to
addre ss th e is su es of big P yth on use rs . S o it 's not
id eal, but it 's
sig nif ic a ntly bette r th an th e alt e rn ativ e , w hic h w as fo r P yth on 3
to
beco m e P erl 6 .
Dris co ll
: W hat's y o ur o pin io n o f P yth on 3 ?
Lefk o w it z
: I'm in P yth on 3
in m y d ay jo b n ow a nd I lo ve it . A fte r m uch
blo od, sw eat and te ars , I th in k it actu ally
is a bette r pro gra m min g

la nguage th an Pyth on 2 was. I th in k th at it re so lv e s a lo t
of
in co nsis te ncie s.
Most im pro ve m ents sh ould m ir ro r q ualit y o f lif e is su es a nd th e re ally
in te re stin g
stu ff g oin g o n in P yth on is a ll in th e e co syste m . I a bso lu te ly
ca nnot w ait fo r a P yP y
3.5 , b eca use o ne o f th e re al d ow nsid es o f u sin g
Pyth on 3 a t w ork is th at I n ow h ave
to d eal w it h th e fa ct th at a ll o f m y
co de is 2 0 tim es s lo w er.
When I d o s tu ff fo r th e T w is te d e co syste m , a nd I ru n s tu ff o n T w is te d's
in fr a str u ctu re ,
we u se P yth on 2 .7 a s a la nguage e ve ry w here , b ut w e u se
PyP y as th e ru ntim e. It is
ju st unbelie va bly fa st! If yo u'r e ru nnin g
se rv ic e s, th en th ey c a n r u n w it h a te nth
of th e r e so urc e s.
A P yP y p ro ce ss w ill ta ke
8 0 M B o f m em ory , b ut o nce y o u'r e r u nnin g th at
it w ill a ctu ally ta ke m ore m em ory p er
in te rp re te r, b ut le ss m em ory p er
obje ct. S o if y o u'r e d oin g a ny P yth on s tu ff a t s ca le ,
I th in k P yP y is s u per
in te re stin g.
One o f m y c o ntin ued b it s o f c o nfu sio n a bout th e P yth on c o m munit y is
th at th ere 's th is
th in g o ut th ere w hic h , fo r P yth on 2 a nyw ay, ju st m ake s a ll
of y o ur c o de 2 0 tim es fa ste r.
This w asn 't re ally s u per p opula r, in fa ct
PyP y d ow nlo ad s ta ts s till s h ow th at it 's
not a s p opula r a s P yth on 3 , a nd
Pyth on 3 is r e ally e xp erie ncin g a h uge u ptic k in p opula rit y .
Gly p h L efk o w it z : 'T he la ck o f v ia b le P yth on 3 im ple m en ta tio n f o r
PyP y is s ta rtin g
to h urt it q uit e a b it .'
I d o th in k th at g iv e n th at th e u pta ke in p opula rit y h as h appened, th e la ck
of a v ia ble
Pyth on 3 im ple m enta tio n fo r P yP y is s ta rtin g to h urt it q uit e a
bit . B ut it w as a ro und
and v e ry fa st fo r a lo ng tim e b efo re P yth on 3 h ad
eve n h it 1 0% o f P yP y's d ow nlo ads.
So I k e ep w antin g to p re dic t th at th is
is th e y e ar o f P yP y o n th e d eskto p, b ut it
ju st n eve r s e em s to h appen.
Dris co ll
: W hy d o y o u th in k P yP y
h as n ot ta ke n o ff o n th e s e rv e r?
Lefk o w it z
: I'm s till n ot q uit e s u re w hy, b eca use e sp ecia lly fo r c o m panie s
wit h s ig nif ic a nt
in fr a str u ctu re s p end, it c o uld s a ve th em lit e ra lly m illio ns o f

dolla rs a y e ar to r u n.
You c a n te ll c o m panie s th at th ey w ill s a ve m illio ns o f d olla rs a y e ar if th ey
re w rit e
all o f th eir c o de. T he p ro ble m is th ey w ould b e ta kin g a h uge
se cu rit y ris k, b lo w in g
up th e s iz e o f th eir d eve lo pm ent te am a nd m akin g
no fe atu re p ro gre ss in tw o y e ars .
That's a b ad tr a de-o ff a nd I c a n s e e
why y o u w ould n't w ant to d o th at.
Wit h P yP y w e s a y, "W hy is th at n ot th e fu tu re ? W e ju st d ro pped in th is
new in te rp re te r."
There a re r e aso ns th at w e c a n't u se it , s u ch a s th at th e
scie ntif ic P yth on c o m munit y 's
to olin g d oes n ot w ork o n P yP y y e t. B ut
th at's actu ally th e exce ptio n ra th er th an th e
ru le , and eve n N um Py
pro gra m s la rg ely w ork o n P yP y. I w ro te s o m e O penG L s tu ff la st
ye ar th at
use s P yP y e xte nsiv e ly a nd d oin g th at w as r e ally in te re stin g.
Dris co ll
: W hat d o y o u
lik e a bout P yP y?
Lefk o w it z
: You w rit e an O penG L pro gra m usin g C Pyth on and it 's
str u gglin g to s ta y a t 5 0 fr a m es
per s e co nd. Y ou d o th e s a m e th in g in
PyP y a nd it 's 3 00, 4 00 o r 5 00 fr a m es p er s e co nd,
not b re akin g a
sw eat
and
not ta kin g u p C PU .
Gly p h L efk o w it z : 'W here I w ould lik e t o s ee P yth on g o is f o r it t o
ad opt m ore a d van ced
te ch nolo gy.'
Where I w ould lik e to s e e P yth on g o is fo r it to a dopt m ore a dva nce d
te ch nolo gy, but
fo r so m e re aso n we'v e co lle ctiv e ly la gged behin d.
Anoth er th in g th at I th in k w ill
be c rit ic a l fo r d ete rm in in g w here P yth on
goes is to w hat e xte nt w e c a n g et a w ay fr o m
pip
a s a to ol fo r u se rs to
in sta ll a pplic a tio ns.
I th in k th at w e n eed a b ette r s to ry fo r h ow y o u w rit e c ro ss-p la tfo rm G UI
co de, e ve n
if it 's re ally b asic . F or in sta nce ,
tkinter
is b ad e nough th at
people ju st d on't u se it . W e n eed a b ette r s to ry fo r h ow y o u p acka ge
applic a tio ns.
I w ant to m ake a n a pp th at I c a n u plo ad to th e A pp S to re , e ve n b efo re w e
sta rt ta lk in g
about m obile . T here a re a ll th e is su es o f r e so urc e c o nstr a in ts

th at co m e a lo ng w it h
th at. I w ant to co m pile m y app and put it on
so m eone e ls e 's c o m pute r, b ut it is w ay
to o h ard to d o th at r ig ht n ow .
Dris co ll
: D o y o u s e e m akin g a pps b eco m in g e asie r?
Lefk o w it z
: I'm e nco ura ged b y p ro je cts lik e p yb ee/b rie fc a se , a nd I th in k
th at th ey'r e s ta rtin g
to fin ally g ain s o m e tr a ctio n.
They'r e a v e ry s m all p ro je ct w it h v e ry b ig p ro ble m s in fr o nt o f th em . B ut
th ey'r e
als o ve ry dete rm in ed and co m mit te d, w it h re al exp erie nce of
navig atin g th ose is su es.
This is e vid ence d b y P yth onis ta , th e iO S P yth on
app, w hic h u se s th eir c o de.
I th in k th at th e s to ry a ro und b uild in g a nd in te gra tin g P yth on p ro gra m s is
gettin g
bette r a ll th e tim e. I a m o ptim is tic th at w it h in th e n ext fiv e y e ars , it
won't b e
unusu al to s e e a pps th at a re fu lly w rit te n in P yth on, ra th er th an
th e s m all h andfu l
of e xa m ple s th at w e h ave n ow .
It w ould b e a s h am e if th e o nly w ay y o u c o uld re alis tic a lly g et P yth on
co de fr o m o ne
co m pute r to a noth er w as D ocke r. P yth on s h ould b e o n
yo ur M ac, it s h ould b e o n y o ur
Andro id , it s h ould b e o n y o ur L in ux b ox, it
sh ould be in th e clo ud and it sh ould be
on yo ur R asp berry P i. In
partic u la r, w it h th e e m erg ence o f th e In te rn et o f T hin gs,
I r e ally w is h m ore
of th ose th in gs w ere r u nnin g P yth on w eb s e rv e rs .
Gly p h L efk o w it z : 'T he m is sio n is P yth on o n e very p ort, a n d w e
re ally f e el lik e t h at's
an im porta n t m is sio n.'
The m is sio n is P yth on o n e ve ry p ort, a nd w e re ally fe el lik e th at's a n
im porta nt m is sio n.
So m any s e rv ic e s, th e th in gs th at p eople a ctu ally u se
to ta lk to e dge n etw ork d evic e s
su ch a s N gin x, A pach e, X M a nd B IN D,
are a ls o in C .
We'r e w rit in g a ll o f o ur a pplic a tio n c o de in th ese h ig h-le ve l la nguages.
The th in gs
th at a re a ctu ally p ullin g th e b yte s o ff th e w ir e a nd h andin g
th em to y o ur a pplic a tio n,
th en p ars in g th em , a re a ll b are ly -m ain ta in ed C
pro gra m s fr o m 2 0 y e ars a go. T his is
a r e al d anger.

So th e id ea is th at y o u c a n't d o c ry p to in P yth on. C ry p to p rim it iv e s n eed
to b e in
C, b ut th ose a re a tin y p art o f a s e cu rit y a pplic a tio n. H ig he r-le ve l
cry p to gra phic
co nstr u ctio ns ca n (a nd re ally sh ould ) abso lu te ly be
asse m ble d in P yth on, w here yo u'r e
dealin g w it h co m posin g m ult ip le
cry p to gra phic p rim it iv e s in to a w ork a ble w hole . D oin g
th at c o m posit io n in
C is d angero us a nd e rro r-p ro ne.
In m any c a se s, y o u h ave to d ro p d ow n to a s u bla ye r, b ut y o u h ave to
writ e c ry p to p rim it iv e s
in a la nguage w here y o u c a n te ll th e u nderly in g
hard w are to ta ke fix e d le ngth s o f
tim e to d o th in gs. S o it h as to b e
co m ple te ly data in put in dependent. It als o has
to be extr e m ely fa st,
beca use y o u d on't w ant to b e p ayin g a h uge o ve rh ead to e ncry p t
th in gs.
You ju st n eed to e ncry p t th em n o m atte r w hat.
Dris co ll
: D o y o u th in k th at th e P yth on
la nguage is h ere to s ta y?
Lefk o w it z
: W ow , th at's an in te re stin g questio n! I th in k th at m any
la nguages th at h ave h ad th e
lif e tim e th at P yth on h as h ad, h ave s o rt o f
slo w ly fa ded in to le gacy s ta tu s.
Ove ra ll, I th in k o ne o f th e p la ce s th at th e P yth on la nguage is g oin g is
fo rw ard s.
It's s till a n u nbelie va bly v ib ra nt c o m munit y a nd it 's s till g ro w in g.
It w as g ro w in g
slo w ly a t th e b egin nin g a nd it 's g ro w in g s lo w ly n ow , b ut it
has been co nsis te ntly
gro w in g ove r ye ars and ye ars . I th in k th is is
in te re stin g b eca use th ere a re a lo t
of la nguages th at h ave b een g ig antic
fla sh es in th e p an. R uby w as h ugely p opula r fo r
a w hile a nd th en it s
popula rit y r e ally p lu m mete d w it h R ails lo sin g p opula rit y .
Gly p h L efk o w it z : 'I t h in k P yth on is g oin g t o h ave a m uch lo nger lif e
th an p re vio us
gen era tio ns o f la n guag es.'
I th in k Pyth on is goin g to have
a m uch lo nger lif e th an pre vio us
genera tio ns of la nguages, whic h were in th eir heyd ay
su per-h ot
te ch nolo gy, a nd th en fa ded a w ay w it h th e n ext g enera tio n o f s tu ff . I th in k
Pyth on is b eco m in g it s o w n n ext g enera tio n. Ir o nic a lly , I th in k th at P yth on
3 is a
ve ry s m all p art o f th at.
One th in g th at I re ally h ope h appens, a nd I th in k it 's a noth er o ne th at

hasn 't y e t,
is P yth on in th e b ro w se r. S ku lp t, P yjs , P yP y.js , a nd a b unch o f
oth er p ro je cts h ave
kin d o f g ot th in gs th at a re g ood p ro ofs o f c o nce pt, b ut
again n obody's s it tin g d ow n
and g oin g: "I'm a n ew P yth on p ro gra m mer
and I w ant to d o a fr o nte nd P yth on a pp. W hat
do I d o?"
The a nsw er to th at is in evit a bly th at th e th in g th at a ctu ally le ts y o u d o
what y o u
want to d o is o nly o n G it m aste r in th is o ne p ro je ct. Y ou'v e g ot
to c h eck it o ut a nd
ch eck o ut a noth er p ro je ct. W hen y o u a sk th e q uestio n:
"W ell, w hy c a n't I
pip
in sta ll th is ? " T he a nsw er is : "W e'r e k in d o f s till
work in g o n it a nd it 's n ot fu lly
done."
Gly p h L efk o w it z : 'I d o t h in k t h at P yth on w ill c erta in ly k eep g ro w in g
in a v arie ty
of d if f e re n t b acken d c ap acit ie s.'
The a nsw er s h ould ju st b e, o f c o urs e , th at y o u c a n
pip
in sta ll it a nd it
sh ould n't b e h ard er th an th at. S o th at's w here I h ope th e c o m munit y
will
go, b ut I d o th in k th at P yth on w ill c e rta in ly k e ep g ro w in g in a v a rie ty o f
dif f e re nt
backe nd c a pacit ie s.
I a ls o th in k th at w here w e'r e h eaded a s a la nguage a nd a n e co syste m is
to w ard s g re ate r
div e rs it y . It's g oin g to ta ke u s to s o m e s u rp ris in g p la ce s
th at I c a n't p re dic t, b ut
I w ould s a y th at it lo oks lik e P yth on is g oin g to b e
aro und fo r a r e ally lo ng tim e.
I th in k th at fo r n ow , w here P yth on's g oin g is
data scie nce . T here a re o bvio usly a
lo t of people in te re ste d in data
scie nce r ig ht n ow .
Dris co ll
: P yth on is b ein g u se d a lo t in th e A I a nd m ach in e le arn in g b oom .
Why d o y o u th in k
th is is ?
Lefk o w it z
: A I is a b it o f a
c a tc h -a ll te rm th at te nds to m ean w hate ve r th e
most a dva nce d a re as in c u rre nt c o m pute r
scie nce r e se arc h a re .
There w as a tim e w hen th e b asic g ra ph-tr a ve rs a l s tu ff th at w e ta ke fo r
gra nte d w as
co nsid ere d A I. A t th at tim e, L is p w as th e b ig A I la nguage,
ju st b eca use it w as h ig her-le ve l
th an a ve ra ge a nd e asie r fo r re se arc h ers
to d o q uic k p ro to ty p es w it h . I th in k P yth on
has la rg ely re pla ce d it in th e
genera l s e nse b eca use , in a ddit io n to b ein g s im ila rly
hig h-le ve l, it h as a n
exce lle nt th ir d -p arty lib ra ry e co syste m , a nd a g re at in te gra tio n
sto ry fo r

opera tin g s yste m fa cilit ie s.
Lis p ers w ill o bje ct, s o I s h ould m ake it c le ar th at I'm n ot m akin g a p re cis e
sta te m ent
about P yth on's p osit io n in a h ie ra rc h y o f e xp re ssiv e ness, ju st
sa yin g th at b oth P yth on
and L is p a re in th e s a m e c la ss o f la nguage, w it h
th in gs lik e g arb age c o lle ctio n, m em ory
sa fe ty , m odule s, n am esp ace s a nd
hig h-le ve l d ata s tr u ctu re s.
In th e m ore sp ecif ic se nse o f
mach in e le arn in g, w hic h is w hat m ore
people m ean w hen th ey s a y A I th ese d ays, I th in k
th ere a re m ore s p ecif ic
answ ers . T he exis te nce of N um Py and it s acco m panyin g eco syste m
allo w s fo r a v e ry re se arc h -fr ie ndly m ix o f h ig h-le ve l s tu ff , w it h v e ry h ig h-
perfo rm ance
num ber-c ru nch in g. M ach in e le arn in g is n oth in g if n ot v e ry
in te nse n um ber-c ru nch in g.
Gly p h L efk o w it z : 'T he P yth on c o m munit y 's f o cu s o n p ro vid in g
fr ie n dly in tr o ductio ns...
to n on-p ro gra m mers , h as r e ally in cre ased
it s a d optio n in t h e s is te r d is cip lin es o f
data s cie n ce a n d s cie n tif ic
co m putin g.'
The P yth on co m munit y 's fo cu s o n p ro vid in g fr ie ndly in tr o ductio ns a nd
eco syste m su pport
to non-p ro gra m mers , has re ally in cre ase d it s
adoptio n in th e s is te r d is cip lin es o f
data s cie nce a nd s cie ntif ic c o m putin g.
Countle ss w ork in g sta tis tic ia ns, a str o nom ers ,
bio lo gis ts , a nd b usin ess
analy sts have beco m e P yth on pro gra m mers and have im pro ve d
th e
to olin g. P ro gra m min g is fu ndam enta lly a so cia l activ it y and P yth on's
co m munit y
has a ckn ow le dged th is m ore th an a ny o th er la nguage e xce pt
Ja va S crip t.
Mach in e le arn in g is a partic u la rly in te gra tio n-h eavy dis cip lin e, in th e
se nse th at
any A I/m ach in e le arn in g s yste m is g oin g to n eed to in gest
la rg e a m ounts o f d ata fr o m
re al- w orld s o urc e s a s tr a in in g d ata , o r s yste m
in put, s o P yth on's b ro ad lib ra ry e co syste m
means th at it is o fte n w ell-
posit io ned to a cce ss a nd tr a nsfo rm th at d ata .
Dris co ll
: W hat c o uld b e d one to m ake
P yth on a b ette r la nguage fo r A I
and m ach in e le arn in g?

Lefk o w it z
: U sin g m ore P yP y. R ig ht
now , th e data scie nce /m ach in e
le arn in g eco syste m in P yth on is ve ry fo cu se d aro und
th e C Pyth on
ru ntim e, w hic h is u nfo rtu nate .
This m eans th at n ew to ols a re o fte n c re ate d w it h out te stin g o n P yP y,
whic h m eans th at
when th ey h ave p erfo rm ance b ottle necks, re w rit e s o f
co re lo gic in C (o r, if y o u'r e
lu cky, C yth on) a re a n in evit a ble p art o f a ny
sig nif ic a nt p ro je ct.
Gly p h L efk o w it z : 'R ig ht n ow t h e d ata s cie n ce/m ach in e le arn in g
eco syste m in P yth on
is v ery f o cu sed a ro und t h e C Pyth on r u ntim e,
whic h is u nfo rtu nate .'
This is la rg ely a s o cia l p ro ble m a nd th e te ch nic a l c h alle nges p re ve ntin g
so m e p arts
of th e c u rre nt P yth on A I/m ach in e le arn in g in fr a str u ctu re fr o m
ru nnin g, o r ru nnin g
well, o n P yP y a re n ot sig nif ic a nt in te rm s o f th e
re so urc e s th ey w ould ta ke to fix
if th eir m ain ta in ers c a re d. B ut, fr o m th e
pers p ectiv e o f s o m eone u nin vo lv e d w it h th ose
pro je cts , w ho is s ta rtin g a
pro je ct and tr y in g to use P yP y, it 's ju st one in scru ta ble
fa ilu re afte r
anoth er in s o m e c o de y o u d on't k n ow a nyth in g a bout.
This is tr u e in s e ve ra l fie ld s o f P yth on's a pplic a tio n a nd I ju st w is h th at
more fo lk s
would th in k o f P yth on a s a la n guage th at c a n b e v e ry fa st, a nd
co m petit iv e w it h J a va
or e ve n C ++, a nd p la n a cco rd in gly w hen e va lu atin g
th eir te stin g m atr ix .
Gly p h L efk o w it z : 'I ju st w is h t h at m ore f o lk s w ould t h in k o f P yth on
as a la n guag e
th at c an b e v ery f a st, a n d c o m petit iv e w it h J ava o r
even C ++.'
Dris co ll
: W hat c h anges w ould y o u lik e to s e e in
fu tu re P yth on r e le ase s?
Lefk o w it z
: M y m ain w is h is fo r th ere to b e s o m e g ood d efa ult s fo r g ettin g
new p ro je cts s e t
up.
For e xa m ple , to day y o u h ave to k n ow th at w hen y o u in sta ll P yth on, y o u

als o n eed to
in sta ll
pip
, a nd th en y o u a ls o n eed to c re ate a
virtualenv
,
but all of th ese ste ps are optio nal. Y ou als o have to hand-c re ate a
setup.py
to describ e yo ur pro je ct, th en le arn about build in g w heels ,
sp ecif y in g d ependencie s
and s o o n.
What I'd lik e to se e is P yth on
pre se ntin g a n in te gra te d vie w o f b est
pra ctic e s, th at m ake s it h ard er to g et lo st
in th e w eeds o f in sta llin g s tu ff .
This c o uld b e ju st h avin g a
new project
b utto n, s o th a t a P yth on p ro je ct
would lo ok lik e a ny o th er k in d o f d ocu m ent to a
use r ju st g ettin g s ta rte d.
Als o , P yth on c o uld lo ok m ore lik e a n a pp, e ve n if th at
app r e quir e d lo ts o f
co m mand-lin e u se .
Seco ndary to th at, I'd lik e to se e to ols th at m ake it e asie r fo r lib ra ry
auth ors to
pro te ct priv a te im ple m enta tio n deta ils fr o m accid enta l
bre aka ge. F or e xa m ple , yo u
ca n im port th e stu ff th at th e lib ra ry h as
im porte d, r a th er th an im portin g th e s tu ff
th at th e lib ra ry is tr y in g to d efin e.
Rig ht n ow , u pgra din g P yth on lib ra rie s is e xtr a
ris ky, b eca use e ve ry s in gle
use r of eve ry lib ra ry m ig ht have m ade a m is ta ke lik e th is
and be
dependin g o n a b ug.
The to ol th at I w ant to m ake it e asy fo r u se rs to c re ate p ro je cts w ould
benefit a
lo t fr o m c o m in g w it h th e la nguage, b ut th is ty p e o f b oundary
enfo rc e m ent a ro und m odule s
would h ave to b e b uilt in to th e la nguage. It
would b e e xtr e m ely h ard to b uild it in
th e e co syste m .
Dris co ll
: S o w hat do yo u th in k is th e best th in g about
th e P yth on
co m munit y ?
Lefk o w it z
: O ne o f th e th in gs th at I th in k is r e ally g ood is th e c o m mit m ent
to d iv e rs it y . A
lo t o f p eople th in k th at th is is a p olit ic a l th in g o r th at th ere
are dif f e re nt fa ctio ns
fo r pro -d iv e rs it y and anti- d iv e rs it y . D iv e rs it y is
alm ost s e en a s ta kin g a w ay fr o m
th e te ch nic a l s tu ff s o m ehow .
I ca n ju st sh are m y o w n p ers o nal jo urn ey to b eco m in g in te re ste d in
div e rs it y a nd s o cia l
ju stic e . I lo oke d a ro und a T w is te d p ro je ct a nd I s a id ,
"W hy a re w e 1 00% d udes? W hat
is g oin g o n h ere ? W hat h ave w e d one
to s h ut w om en o ut o f th is p ro je ct? "
Gly p h L efk o w it z : 'W e w ere c le arly m is sin g o ut o n h alf t h e t a le n t t h e

world h ad t o
off e r.'
I fe lt b ad, b ut a ls o th at w e w ere c le arly m is sin g o ut o n h alf th e ta le nt th e
world
had to o ff e r in ju st th e m ost o bvio us w ay. W e w ere a ls o a ll w hit e
and th ere a re lo ts
of p eople o f c o lo r w ho a ls o h ave ta le nt to o ff e r. T hey
were n't s h ow in g u p. S o th ere 's
ce rta in ly a d egre e o f a lt r u is tic im puls e s,
but I a ls o th in k th at m any p eople in sid e
th e P yth on co m munit y h ave
acce pte d th at th is is a r e al s kills g ap is su e.
If w e d on't g et a d iv e rs e g ro up o f p eople w ork in g o n o ur s tu ff , a nd g ettin g
in vo lv e d
in o ur c o m munit y , th en w e'r e n ot g oin g to m ake s o ftw are th at's
use fu l to a lo t o f
th e w orld . W e'r e g oin g to b e m is sin g o ut o n a lo t o f ta le nt
and w e'r e g oin g to b e
mis sin g o ut o n a lo t o f in te re stin g v o ic e s th at w ill
ch alle nge u s, a nd m ake u s a m ore
in te re stin g c o m munit y .
Gly p h L efk o w it z : 'I f w e d on't g et a d iv ers e g ro up o f p eo ple w ork in g
on o ur s tu ff ...
th en w e'r e n ot g oin g t o m ake s o ftw are t h at's u sefu l.'
So w hen w e ta lk e d e arlie r a bout th e
te ch nic a l d ir e ctio ns th at th e P yth on
co m munit y h as b een m ovin g in , th ose d ir e ctio ns
are a id ed b y th is p urs u it
of d iv e rs it y . I b elie ve th at o ne o f th e r e aso ns th at P yth on
is p opula r in lif e
scie nce s is th at it h as a d if f e re nt d em ogra phic b re akd ow n th an
th e r e st o f
th e te ch in dustr y . I th in k P yth on h as m ade r e al in ro ads th ere , in la rg e
part
beca use p eople lo ok a t th e P yth on c o m munit y a nd a re n o t s ca re d o ff . It's
not
an in tim id atin g o r e xclu sio nary ty p e o f e nvir o nm ent.
Gly p h L efk o w it z : 'T he P yth on c o m munit y is n ot p erfe ct. W e s till
have a lo ng w ay t o
go.'
Now th at s a id , I fe lt a lit tle w eir d c o m mentin g o n th is b eca use I a ls o fe el
th at th e
Pyth on c o m munit y is n ot p erfe ct. W e s till h ave a lo ng w ay to g o.
The te ch in dustr y
ove ra ll is h ig hlig htin g w om en, ju st b eca use th at's th e
most o bvio us d em ogra phic d is p arit y ,
but th ere are als o lo ts of oth er
underre pre se nte d g ro ups.

When y o u lo ok a t th e re pre se nta tio n o f w om en th ro ughout th e s o ftw are
in dustr y , y o u'v e
got a bout 2 5 to 3 0% , d ependin g o n h ow it 's m easu re d.
Then yo u lo ok a t th e o pen so urc e
co m munit y a nd it 's m ore lik e 5 %
wom en, w hic h is a lo t b ette r th an it w as a c o uple
of y e ars a go, w hen it
was a bout 1 % .
The P yth on c o m munit y is c o nsid era bly b ette r th an th at, b ut s till w hen y o u
lo ok a t
people w ho a re a ctiv e ly p artic ip atin g in p ro je cts , it 's n ot e ve n
re ally hit tin g th e
in dustr y ave ra ge, le t alo ne th e ove ra ll dem ogra phic
ave ra ge.
Dris co ll
: H ow c a n th e P yth on c o m munit y
e nco ura ge m ore d iv e rs it y ?
Lefk o w it z
: I th in k w e s till h ave a lo ng w ay to g o, b ut th e fa ct th at th e
Pyth on c o m munit y h as,
in th e la rg e p art, a ckn ow le dged th e r e al p ro ble m
th at's a ff e ctin g a lo t o f a sp ects
of te ch nolo gy is im porta nt. D iv e rs it y is a n
is su e th at's a ff e ctin g th e c u lt u re a ro und
te ch nolo gy.
Gly p h L efk o w it z : 'D iv ers it y is a n is su e t h at's a ff e ctin g t h e c u lt u re
aro und t e ch nolo gy.'
You h ave o th er c o m munit ie s, lik e C lo ju re o r E rla ng, w hic h h ave fa nta stic
te ch nolo gy
on o ff e r, b ut th ey d on't r e ally c a re a bout th e d iv e rs it y p ro ble m .
You c a n s e e th at
re fle cte d in a m onocu lt u re a m ong th eir th in kin g a nd th e
la ck o f s u cce ss b eco m in g m ore
popula r.
I th in k a c o m munit y w hic h is la rg ely fo llo w in g in P yth on's fo ots te ps is
Rust. D esp it e
it b ein g e xtr e m ely lo w -le ve l a nd s o m ew hat te dio us to w rit e ,
th ey d o h ave s o m e g re at
id eas in th at la nguage. A s a re su lt o f b ein g
more in clu siv e a nd th oughtfu l a bout th e
way th e c o m munit y is o rg aniz e d,
Rust is skyro cke tin g in popula rit y fr o m ve ry fa r dow n
on th e lis t of
la nguages.
Gly p h L efk o w it z : 'I t h in k t h at t h e in clu siv en ess o f t h e P yth on
co m munit y is d efin it e ly
th e b est t h in g a b out it .'

So I th in k th at th e in clu siv e ness o f th e P yth on c o m munit y is d efin it e ly th e
best th in g
about it . T hat is n ot ju st a c o m ment o n it s p olit ic a l o rie nta tio n,
but a co m ment o n
it s a bilit y to p ro duce in te re stin g te ch nolo gy in th e
fu tu re .
I th in k th at P yth on h as e ndure d b y b ein g fr ie ndly . It's o pen to lo ts o f
people fr o m
new a nd d if f e re nt c o m munit ie s. I d on't k n ow h ow to p re dic t
th e fu tu re r e ally , b eca use
it 's g oin g to d epend o n w ho s h ow s u p n ext.
Dris co ll
: T hank y o u, G ly p h L efk o w it z .

C hap te r 5 . D oug H ellm an n
D oug H ellm ann
is a n A m eric a n s o ftw are d e ve lo per a nd a uth or. H e is a
f e llo w of th e Pyth on Softw are
Foundatio n (P SF) and se rv e d as
c o m munic a tio ns d ir e cto r fo r a lm ost tw o y e ars . D oug
was a c o lu m nis t fo r
t h e P yth on M agazin e, b efo re b eco m in g e dit o r-in -c h ie f. H e a ls o
cre ate d
a nd s u sta in ed
th e p opula r P yth on M odule o f th e W eek b lo g, w hic h w as
c o m pile d a nd p ublis h ed in h is
book,
The P yth on 3 S ta ndard L ib ra ry b y
E xa m ple
. D oug w ork s a s a s e nio r p rin cip al s o ftw are e ngin eer a t R ed H at,
w here he fo cu se s
on co m munit y le aders h ip and ach ie vin g lo ng-te rm
s u sta in abilit y fo r O penS ta ck.
Dis cu ssio n t h em es: O pen S ta ck, v ir tu ale n vw ra p per, v 2.7 /v 3.x .
Catc h u p w it h D oug H ellm an n h ere : @ doughellm an
M ik e D ris co ll
: W hy
did y o u b eco m e a p ro gra m mer, D oug?
D oug H ellm an n
: I g ot in te re ste d in c o m pute rs w hen I w as p re tty y o ung,
t h ro ugh s o m e s u m mer p ro gra m s
th at m y lo ca l s ch ool s yste m ra n a t th e
t im e. I e njo ye d p ro gra m min g, a nd le arn in g a bout
how c o m pute rs w ork ,
s o I d ecid ed to p urs u e a C S d egre e in c o lle ge. T he w ork w e d id
in s ch ool
r e ally re in fo rc e d fo r m e th at p ro gra m min g w as s o m eth in g I c o uld e njo y
d oin g
fo r a liv in g.

Dris co ll
: W hy P yth on? W hat m ake s
Pyth on s p ecia l to y o u?
Hellm an n
: I w as fir s t in tr o duce d to P yth on a ro und 1 997, w hen I w as
work in g in a to ols and
build m anagem ent gro up fo r a G IS so ftw are
co m pany c a lle d E R DAS.
We n eeded to b uild s o m e to ols to h elp m anage th e b uild s o n s e ve ra l
UNIX pla tfo rm s,
as w ell as W in dow s N T and 95. W e had a lo t of
Make file s a nd sh ell scrip ts , b ut th ey
were n't e sp ecia lly p orta ble . T he
more I u se d P yth on, th e m ore I w as a ble to fin d n ew
ways to u se it .
Doug H ellm an n: 'T he m ore I u sed P yth on, t h e m ore I w as a b le t o
fin d n ew w ays t o u se
it .'
Afte r fir s t le arn in g P yth on, I r e m em ber b ein g s im ult a neously h appy th at I
had fo und
a n ew to ol la nguage th at w as s o e asy to u se , a nd s a d th at th e
co m pany I w as w ork in g
wit h d id n't le t u s u se it fo r 'r e al w ork ' a t th e tim e!
Dris co ll
: D oug, y o u w ent o n to b eco m e th e te ch nic a l e dit o r fo r P yth on
Magazin e, w hic h I u se d
to r e ally e njo y. I'v e a lw ays w ondere d h ow
Pyth on
Magazin e
g ot s ta rte d...a nd w hy d id it th en s to p?
Hellm an n
: P yth on M agazin e b egan w it h B ria n J o nes a s th e fir s t e dit o r-
in -c h ie f.
Bria n p it c h ed th e id ea to M TA , th e p ublis h ers . T hey h ad b een fo cu se d o n
th e PH P co m munit y ,
but agre ed th at it se em ed lik e th e Pyth on
co m munit y c o uld a ls o s u pport a m agazin e.
Was th at th e r ig ht c a ll? W ell, w e d id o ka y fo r a w hile , b ut I th in k th e tim in g
was
poor fo r a n ew p aid p rin t p ublic a tio n to la unch . A n e -z in e m ig ht w ork
bette r, to day,
but it 's a to ugh in dustr y .
Dris co ll
: W hat m ade y o u a ls o s ta rt th e tr e m endously s u cce ssfu l 'P yth on
Module o f th e W eek'
se rie s, D oug? W hat's d riv e n y o u to c a rry o n w rit in g
PyM OTW
fo r m ore th an te n y e ars n ow ?
Hellm an n
: Y es, it h as b een o ve r te n y e ars . I s ta rte d th e P yM OTW b lo g

se rie s (
http s://p ym otw .c o m
) in 2 007 a s a
way to p ush m yse lf to w rit e o n a
re gula r b asis . I d ecid ed a th em e w ould m ake it e asie r
to fin d to pic s to
writ e a bout, a nd w rit in g o nce a w eek s e em ed lik e a g ood g oal.
The in te re st fr o m th e re st o f th e c o m munit y g re w s lo w ly o ve r tim e, b ut
fe edback w as
mostly p osit iv e . I'm s u re I w ould h ave s to pped e arly o n if it
wasn 't fo r a ll o f th e
fe edback a nd s u pport th at e ve ry o ne h as g iv e n m e.
Dris co ll
: H ow d id y o ur
book c o m e a bout, D oug?
Hellm an n
: A t a P yC on a c o uple o f y e ars in to th e p ro je ct, M ark R am m
in tr o duce d m e to
D ebra W illia m s C aule y, an edit o r fr o m P ears o n. I
pit c h ed th e id ea o f c le anin g u p
th e b lo g p osts a nd tu rn in g th e s e rie s in to
a b ook. D ebra h elp ed m e to fig ure o ut h ow
to s tr u ctu re it to m ake it w ork
in th at fo rm at. T he w hole te am a t P ears o n h as b een
gre at to w ork w it h .
Doug H ellm an n: 'T he P yth on 3 S ta n dard L ib ra ry c o nta in s h undre d s
of m odule s f o r in te ra ctin g
wit h t h e o pera tin g s yste m , in te rp re te r,
an d in te rn et.'
Dris co ll
: Y our b ook is in cre dib ly h elp fu l to P yth on d eve lo pers . S o w hat
do y o u th in k n ew P yth on
pro gra m mers s h ould d o o nce th ey'v e le arn ed
th e b asic s?
Hellm an n
: I e nco ura ge fo lk s to s e t a g oal b y p ic kin g a p ro ble m th at th ey
want to s o lv e fo r
th em se lv e s. T hat g iv e s th em a fr a m ew ork fo r le arn in g
th in gs lik e how to bre ak dow n
a pro je ct in to pie ce s th at ca n be
im ple m ente d o ne a t a tim e, w hic h in tu rn h elp s th em
to fo cu s o n le a rn in g
one s kill a t a tim e.
At P yO hio 2 015
, I ta lk e d a bout o ne o f m y o w n p ro je cts a s a n e xa m ple o f
th is . O f c o urs e , n ot a ll
pro je cts n eed
to b e a s c o m ple x a s th e S m ile y
exa m ple :
http s://d oughellm ann.c o m /b lo g/2 015/0 8/0 2/p yo hio -ta lk -o n-s m ile y-a nd-
it e ra tiv e -d eve lo pm ent/
Eve ry p ro gra m mer b uild s lit tle th ro w -a w ay to ol s crip ts a s w ell a s m ore

co m plic a te d
re usa ble p ro je cts , a nd a ll o f th em a re a n o pportu nit y to le arn
so m eth in g n ew .
Doug H ellm an n: 'E very p ro gra m mer b uild s lit tle t h ro w -a w ay t o ol
scrip ts a s w ell a s
more c o m plic ate d r e u sab le p ro je cts , a n d a ll o f
th em a re a n o pportu nit y t o le arn s o m eth in g
new .'
Anoth er g ood w ay to le arn is to a tte nd a lo ca l m eetu p, a nd ta lk to o th er
pro gra m mers .
The A tla nta P yth on m eetu p g ro up
tr ie s to m ain ta in a g ood
mix o f in tr o ducto ry a nd m ore a dva nce d ta lk s to h elp e nco ura ge
fo lk s w it h
a r a nge o f s kills to a tte nd o ur m eetin gs. S om etim es th e m ost in fo rm ativ e
part o f th e e ve nin g is th e Q &A a fte r a ta lk , o r th e d is cu ssio ns d urin g
bre aks, w hen
yo u h ave th e c h ance to a sk fo r m ore d eta il o r c la rif ic a tio n.
Dris co ll
: W hat
a ctiv e p ro je cts a re y o u in vo lv e d in to day D oug?
Hellm an n
: F or th e p ast fiv e y e ars I'v e b een w ork in g o n v a rio us a sp ects
of O penS ta ck. A sid e
fr o m th e c lo ud m anagem ent s o ftw are it s e lf , w e'v e
pro duce d so m e in te re stin g to ols lik e
th e pbr lib ra ry , to help wit h
packa gin g.
Dris co ll
: S o h ow d id y o u g et s ta rte d
a s a n O penS ta ck d eve lo per?
Hellm an n
: I s ta rte d w ork in g o n O penS ta ck a t D re am Host. I h ad k n ow n
Jo nath an L aC our, th e V P
of e ngin eerin g, th ro ugh th e A tla nta P yth on
meetu p fo r a fe w y e ars a nd th e tim in g w ork e d
out w ell w hen h e n eeded
so m eone, a nd I w as in te re ste d in c h angin g jo bs. W e h ad a s m all
te am in
th e
Atla nta a re a, a nd w e a ll h elp ed e ach o th er to b oots tr a p in to th e
OpenS ta ck c o m munit y .
Doug H ellm an n: 'I h ad k n ow n J o nath an L aC our, V P o f E ngin eerin g,
th ro ugh t h e A tla n ta
Pyth on m eetu p f o r a f e w y ears ...'
Dris co ll
: S o th e p ow er o f
m eetu ps w as re ally in a ctio n th ere ! W hat a re
yo ur g oals fo r O penS ta ck a t th e m om ent?

Hellm an n
: I h ave a ve ry fle xib le m andate fr o m R ed H at to w ork o n
what's n eeded to k e ep th e
OpenS ta ck c o m munit y h ealt h y.
I s e rv e o n th e T e ch nic a l C om mit te e, w hic h is o ur e le cte d g ove rn in g b ody.
We tr y to
guid e th e p ro je ct, a nd h elp to b rin g th e la rg e c o ntr ib uto r b ase to
so m e le ve l o f c o nse nsu s
when w e h ave m ajo r d ecis io ns to m ake .
Doug H ellm an n: 'I h ave a v ery f le xib le m an date f r o m R ed H at t o
work o n w hat's n eed ed
to k eep t h e O pen S ta ck c o m munit y h ealt h y.'
I h ave a ls o s e rv e d a s te am le ad fo r th e O slo te am , w hic h m anages th e
se t o f c o m mon
lib ra rie s s h are d b etw een th e v a rio us O penS ta ck s e rv ic e s.
We tr y to b uild th e lib ra rie s
to b e a s r e usa ble a s p ossib le , b ut s o m etim es
we n eed to s h are c o de w it h in O penS ta ck
th at is n 't g oin g to b e th at u se fu l
to a nyo ne e ls e .
I'v e a ls o w ork e d o n th e r e le ase to ols , e xte ndin g th e p ip elin e to m ake th e
re le ase
pro ce ss s ca le fr o m a h ig hly m anual p ro ce ss fo r fiv e p ro je cts , to a
hig hly a uto m ate d
pro ce ss s u pportin g a ro und 3 50 d if f e re nt d eliv e ra ble s.
I'v e b uilt s o m e to ols lik e
reno
, o ur re le ase n ote m anagem ent p ro gra m ,
and I ju m p in o n o th er in it ia tiv e s w here h elp
is n eeded.
Dris co ll
: S o, re gard in g s o m e o f th e to ols th at y o u'v e c re ate d, w hat w as
yo ur in sp ir a tio n fo r
cre atin g
virtualenvwrapper
?
Hellm an n
: W hile I w as w ork in g a s a te ch nic a l
e dit o r a nd la te r e dit o r-in -
ch ie f fo r P yth on M agazin e, I ended up needin g to m anage
a lo t of
dif f e re nt
virtualenv
's . E ach a uth or p ro vid ed in str u ctio ns fo r in sta llin g th e
to ols th ey u se d fo r th eir
artic le s, a nd I w ante d to b e a ble to te st o ut th e
co de.
I s ta rte d w rit in g a fe w a lia se s to m anage e nvir o nm ents e asily , a nd th e
pro je ct gre w
org anic a lly fr o m th ere . My work flo w has ch anged
sig nif ic a ntly s in ce I'v e b een s o fo cu se d
on O penS ta ck, s o I h ave n't b een
co ntr ib utin g to
virtualenvwrapper
a s m uch a s I u se d to . I'm h appy to
have J a so n M ye rs ta kin g o ve r a s th e le ad m ain ta in er
on th e p ro je ct th ese
days.

Dris co ll
: S o w hile y o u w ere
c re atin g
virtualenvwrapper
, c a n y o u te ll u s
what y o u le arn ed?
Hellm an n
: S ure , I c a n a ctu ally
th in k o f th re e th in gs th at I le arn ed w hile I
was c re atin g
virtualenvwrapper
.
Fir s t o f a ll I le arn ed h ow c o ntr ib utio ns c o m e fr o m s u rp ris in g d ir e ctio ns.
Doug L ato rn ell
pro vid ed th e o rig in al p atc h es to s u pport k sh . I h ad n o id ea
th at a nyo ne w ould b e in te re ste d
in s u pportin g k sh , s o I h adn't th ought
beyo nd B ash . I th in k h e w as u sin g
virtualenvwrapper
o n a n A IX s yste m
at th at p oin t, th ough, a nd h is p atc h es w ere e asy to in te gra te a nd
su pport
once th ey m erg ed.
The s e co nd th in g I le arn ed w as th at it 's im porta nt to k e ep it fu n. F or
in sta nce , I
cre ate d th e fo llo w in g s it e ju st b eca use o f a T w eet fr o m A le x
Gayn or:
http s://b it b ucke t.o rg /d hellm ann/v ir tu ale nvw ra pper.a le x
"T he
virtualenvwrapper.alex
in sta lls a lia se s fo r ty p os r e la te d to c o m mon
virtualenvwrapper
co m mands. R eally . It exis ts beca use A le x G ayn or
aske d n ic e ly ."
The th ir d le arn in g p oin t th at I h ave to o ff e r is th at yo u ca n't p le ase
eve ry o ne a ll
of th e tim e. S o
virtualenvwrapper
s u pports p lu gin s to e nable
fo lk s to s h are th eir e xte nsio ns, b ut th ere is n ow a n e ntir e
ca te gory o f
sim ila r to ols lik e
pyenv
,
vex
, a nd o th ers w here th e o pera tin g m odel is v e ry
dif f e re nt. T hat's g re at! A s I s a id ,
my o w n w ork flo w h as c h anged e nough
th at I d on't r e ly o n
virtualenv wrapper
s o m uch a nym ore , e it h er.
Dris co ll
: S o if yo u co uld sta rt
virtualenvwrapper
fr o m scra tc h , w hat
would y o u d o d if f e re ntly ?
Hellm an n
: I w ould n ow b uild it o n P yth on 3 's
venv
in ste ad o f
virtualenv
and to day I w ould desig n it as a sin gle m ain co m mand th at to ok
su bco m mands.
Dris co ll
: W hat a re y o u m ost e xcit e d a bout in
Pyth on to day?
Hellm an n
: I have alw ays been most excit e d about th e vib ra nt

co m munit y . A s m ore p eople d is co ve r
Pyth on, o r a pply it in n ew a re as,
th at c o m munit y k e eps e xp andin g.
Mik e D ris co ll: W hat a re y o ur th oughts o n th e lo ng lif e o f P yth on
2.7 ?
Hellm an n
: T he lo ng
lif e tim e fo r P yth on 2 .7 re co gniz e s th e re alit y th at
re w rit in g fu nctio nal s o ftw are
base d o n b ackw ard s-in co m patib le u pstr e am
ch anges is n 't a h ig h p rio rit y fo r m ost c o m panie s.
I e nco ura ge p eople to u se th e la te st v e rs io n o f P yth on 3 th at is a va ila ble
on th eir
deplo ym ent p la tfo rm fo r a ll n ew p ro je cts . I a ls o a dvis e th em to
ca re fu lly re co nsid er
portin g th eir re m ain in g le gacy a pplic a tio ns n ow th at
most a ctiv e ly m ain ta in ed lib ra rie s
su pport P yth on 3 .
Dris co ll
: W hat c h anges w ould y o u
lik e to s e e in fu tu re P yth on r e le ase s?
Hellm an n
: I a m m ost in te re ste d in th e w ork re la te d to p acka gin g rig ht
now . T hose ch anges w ill
not g o in to P yth on it s e lf , b ut in to to ols lik e
setuptools
,
twine
,
wheel
,
pip
, a nd
warehouse
. S im plif y in g th e
pro ce ss o f
packa gin g a nd d is tr ib utin g P yth on p acka ges w ill h elp a ll o f o ur u se rs .
Dris co ll
: T hank y o u, D oug H ellm ann.

C hap te r 6 . M assim o D i P ie rro
M assim o D i P ie rro
is a n Ita lia n w eb d eve lo per, d ata s cie nce e xp ert, a nd
l e ctu re r. F or th e la st 1 5 y e ars ,
Massim o h as b een a p ro fe sso r fo r th e
S ch ool o f C om putin g a t D eP aul U niv e rs it y in C hic a go.
He is th e in ve nto r
a nd le ad deve lo per of web2py, an
open so urc e web applic a tio n
f r a m ew ork w rit te n in P yth on. M assim o is a re gula r c o ntr ib uto r
to o pen
s o urc e P yth on p ro je cts a ro und th e w orld a nd h as p ublis h ed
th re e b ooks
o n P yth on, in clu din g
Annota te d A lg orit h m s in P yth on
. H is a ctiv e w ork in
t h e P yth on c o m munit y h as s e en h im e le cte d a m em ber o f th e P yth on
S oftw are F oundatio n ( P SF).
Dis cu ssio n t h em es: w eb 2p y, P yth on b ooks, v 2.7 /v 3.x .
Catc h u p w it h M assim o D i P ie rro h ere : @ mdip ie rro
M ik e D ris co ll
: H ow
did y o u b eco m e a c o m pute r p ro gra m mer?
M assim o D i P ie rro
: S o I a m a p hysic is t, b ut I a ctu ally s ta rte d c o m pute r
p ro gra m min g w hen I w as in m id dle
sch ool. M y d ad h ad th e IB M P C a t
h om e. H e w as a C O BO L p ro gra m mer a nd h e w as m ostly
work in g w it h
a cco untin g s o ftw are .
W hen
I w as 1 3 y e ars o ld , m y d ad g ave a le ctu re o n C O BO L. I w ent w it h
h im a nd h e th ought
I w as ju st ta ggin g a lo ng, b ut I u nders to od w hat h e

was s a yin g a nd s o m eth in g c lic ke d.
My d ad th en g ot m e a C om modore 6 4
and I s ta rte d p ro gra m min g in B ASIC fir s t, a nd P asca l
la te r.
Dris co ll
: S o h ow d id y o u g et in to th e P yth on la nguage?
Di P ie rro
: T hat w as m uch la te r. I w as d oin g m y P h.D . in th e U K a nd I
was m ostly p ro gra m min g
in F ortr a n, C , a nd C ++. M y w ork w as o n la ttic e
quantu m c h ro m odyn am ic s a nd m y m ach in e
was a C ra y T 3E . T hat w as
when I s ta rte d le arn in g P yth on. A t th e tim e, it w as m ostly
use d a s a to ol
to a uto m ate th e p ro ce ssin g o f file a nd s crip tin g m ain te nance ta sks.
By
2004, it h ad b eco m e m y fa vo rit e la nguage.
Dris co ll
: W as
th ere s o m e e pip hany th at m ade y o u d ecid e th at P yth on
was yo ur fa vo rit e la nguage, o r
were yo u ju st u sin g th e la nguage so
much ?
Di P ie rro
: S o, a t th e tim e, a lo t o f th e lib ra rie s th at e xis t to day w ere e it h er
not a va ila ble ,
or n ot a s m atu re .
The th in g th at I re ally lik e d about Pyth on was th at I co uld do
in tr o sp ectio n: I c o uld
ask a fu nctio n w hat it s a rg um ents w ere . S o u sin g
Pyth on, I c o uld w rit e c o de th at w ould
unders ta nd it s e lf to s o m e e xte nt.
Di P ie rro : 'U sin g P yth on, I c o uld w rit e c o de t h at w ould u nders ta n d
it s elf t o s o m e
exte n t.'
I re m em ber d oin g s o m eth in g s im ila r in B ASIC m any y e ars b efo re , b ut I
co uld n ot e asily
do th at in a la nguage lik e C ++. I re ally lik e d th e id ea o f
writ in g a p ro gra m th at
co uld re w rit e it s e lf . F or e xa m ple , I h ave w rit te n a
lib ra ry c a lle d
OCL th at a llo w s m e to d eco ra te s o m e s im ple fu nctio ns in
Pyth on, a nd th ey g et c o nve rte d
at r u ntim e, in C o r O penC L, a nd r u n a t a
hig her s p eed ( it u se s P yO penC L).
Dris co ll
: S o w hat m ade y o u
cre ate w eb2py?
Di P ie rro
: S o w eb2py
s ta rte d in 2 007. A t th at tim e, th e tw o m ost p opula r
Pyth on fr a m ew ork s w ere D ja ngo
and T urb oG ears . I h ad tw o n eeds: I
wante d to te ach web deve lo pm ent in th e model- v ie w -c o ntr o lle r

arc h it e ctu re , a nd fo r m yse lf I n eeded to b uild s o m e w eb a pps.
I w as e va lu atin g
Dja ngo a nd T urb oG ears , a nd I h ad b een u sin g D ja ngo
fo r s o m e tim e. I h ad b uilt a
co nte nt m anagem ent s yste m fo r th e U nit e d
Natio ns in D ja ngo, a s p ro b ono w ork w it h
th e u niv e rs it y . S o I kn ew
Dja ngo p re tty w ell, b ut I th ought th at D ja ngo w as v e rb ose
and k in d o f
dif f ic u lt to te ach a s a fir s t fr a m ew ork .
In o rd er to b e a ble to p rim e in D ja ngo fo r e xa m ple , y o u n eeded to h ave
so m e fa m ilia rit y
wit h th e B ash sh ell a nd so m e syste m a dm in is tr a tio n
to ols . A lo t o f m y s tu dents a t
th at tim e d id n ot h ave th at e xp erie nce . S o I
wante d to te ach w eb d eve lo pm ent in P yth on,
but fo r m e to g o th ro ugh a ll
th e to ols to g et to th at p oin t w as to o m uch w ork . I n eeded
a fr a m ew ork
th at w ould d ow nlo ad a file , sta rt, a nd d o e ve ry th in g th ro ugh th e w eb
in te rfa ce .
Di P ie rro : 'I n eed ed a f r a m ew ork t h at w ould d ow nlo ad a f ile , s ta rt,
an d d o e very th in g
th ro ugh t h e w eb in te rfa ce.'
I a ls o w ork e d in T urb oG ears , w hic h in m any w ays I lik e d b ette r th an
Dja ngo. B ut T urb oG ears
was g oin g th ro ugh a b ig tr a nsit io n. It w as a
fr a m ew ork a sse m ble d o ut o f c o m ponents ,
and a lo t o f th e c o m ponents
were b ein g r e pla ce d, b eca use th ey w ere n ot b ein g m ain ta in ed.
Turb oG ears
d id n ot a ppear to h ave a s ta ble A PI a nd th ere fo re it w as n ot
su it a ble fo r m e a s a
te ach in g to ol. S o I d ecid ed to a pply w hat I h ad
le arn ed, a nd b uild a fr a m ew ork w hic h ,
in m y o pin io n, w as s im ple r to s ta rt
wit h . I n eve r th ought th at fr a m ew ork w ould b eco m e
as p opula r a s it d id .
Di P ie rro : 'I d ecid ed t o a p ply w hat I h ad le arn ed , a n d b uild a
fr a m ew ork w hic h , in
my o pin io n, w as s im ple r t o s ta rt w it h .'
Dris co ll
: S o w hat d o y o u c o nsid er
to b e th e m ost im porta nt le sso n th at
yo u le arn ed w hile y o u w ere c re atin g w eb2py?
Di P ie rro
: T he m ost im porta nt le sso n th at I le arn ed w as th e im porta nce

of b uild in g a c o m munit y .
I g ot to k n ow a lo t o f p eople b y w ork in g w it h
th em r e m ote ly , a lt h ough m any o f th em
I h ave s till n eve r m et.
When I s ta rte d
web2py I w as n ot fa m ilia r w it h c o lla bora tio n to ols lik e G it .
The fir s t ve rs io n of
web2py use d Launch pad. I re m em ber havin g
in te ra ctio ns w here people ju st se nt m e em ails
off e rin g th eir help or
makin g s u ggestio ns. I w as n ot p re pare d fo r th at.
Di P ie rro : 'I s till c o nsid er it a c rit ic al s kill b ein g a b le t o c o lla b ora te
wit h p eo ple
re m ote ly , e ven if y o u d on't k n ow t h em p ers o nally .'
I d id n't k n ow e xa ctly h ow to h andle c o lla bora tio n fo r m any y e ars . T o day, I
still co nsid er
it a crit ic a l skill bein g able to co lla bora te w it h people
re m ote ly , e ve n if y o u d on't
kn ow th em p ers o nally . I m ean, e ve ntu ally I g ot
to k n ow th em a nd tr u st th em a lo t.
Som e o f th e p eople I tr u st th e m ost
are p eople I m et th ro ugh w eb2py.
Dris co ll
: A re th ere a ny fe atu re s th at y o u'v e s e en in F aaS o r D ja ngo th at
yo u th in k w ould b e
good in w eb2py?
Di P ie rro
: w eb2py
o w es a lo t to D ja ngo, a s m any id eas c a m e fr o m it , a s
well a s fr o m o th er fr a m ew ork s.
Yet, w e a dded in to w eb2py m any fe atu re s
th at D ja ngo did not have at th e tim e. F or
exa m ple , str o nger d efa ult
se cu rit y s e ttin gs, lik e a lw ays e sca pin g s tr in gs b y d efa ult .
The fr a m ew ork s
have v e ry d if f e re nt p hilo so phie s.
There a re m any p ro je cts th at u se D ja ngo a nd e ach o ne h as a d if f e re nt
nam e a nd it s
ow n m ain ta in ers . T hey a re v e ry a dva nce d a nd v e ry w ell
main ta in ed. In w eb2py, w e tr y
to k e ep e ve ry th in g in o ne p acka ge, s o th at
we d on't h ave a b ig e co syste m o uts id e o f
th e fr a m ew ork .
Di P ie rro : 'w eb 2p y o w es a lo t t o D ja n go, a s m an y id eas c am e f r o m
it , a s w ell a s f r o m
oth er f r a m ew ork s.'
There a re m any id eas fr o m w eb2py th at o rig in ate d in o th er fr a m ew ork s,
but I b elie ve
th at w e im pro ve d o n s o m e o f th ose id eas. F or e xa m ple , th e

mech anis m fo r fo rm g enera tio n
and p ro ce ssin g in w eb2py is n ot u niq ue
but, w hen it w as d eve lo ped, it w as b ette r th an
th e c o m petit io n.
The m odel- v ie w -c o ntr o lle r desig n arc h it e ctu re w as m ostly ta ke n fr o m
Dja ngo a nd th e
URL m appin g w as a ls o v e ry s im ila r. F or th e la tte r, w e
gave it d efa ult ro utin g ru le s,
lik e in R uby o n R ails . F or th e te m pla te
la nguage, w e d ecid ed th at w e d id n't w ant a
dom ain -s p ecif ic la nguage.
In ste ad, w e w ante d p ure P yth on in te m pla te s, w hic h is k in d
of th e s a m e
model a s th e E R B te m pla te la nguage in R uby o n R ails , b ut u sin g th e
Pyth on
la nguage.
There a re o th er fe atu re s, th at w ere a dded la te r in w eb2py th at w ere a ls o
in sp ir e d
by o th er fr a m ew ork s. F or e xa m ple , o ne th in g I lik e d fr o m F la sk
was th is id ea o f th re ad-lo ca l
va ria ble s. S o th re ad-lo ca l w ould a llo w a ny
module to a cce ss th e c u rre nt r e quest o bje ct,
th e c u rre nt r e sp onse o bje ct,
or th e c u rre nt s e ssio n, e ve n if th e c o de w as ro ote d in
a m odule w hic h
was im porte d fr o m s o m ew here e ls e . I lik e d th e w ay F la sk h andle d th at.
So th ere a re d efin it e ly m any id eas th at c a m e fr o m o th er fr a m ew ork s a nd
I th in k th ere 's
been a lo t o f le arn in g fr o m e ach o th er. N ot e ve ry b ody
adm it s th at, b ut I'm h appy to
adm it it .
Di P ie rro : 'T here 's b een a lo t o f le arn in g f r o m e ach o th er. N ot
every b ody a d m it s t h at,
but I'm h ap py t o a d m it it .'
Dris co ll
: S o I s a w th at y o u
s ta rte d s e lf - p ublis h in g b ooks. H ow d id th at
happen?
Di P ie rro
: I'm a n a ca dem ic , s o I'm s u ppose d to w rit e p apers a nd w rit e
books. Beca use I was
writ in g docu m enta tio n fo r so ftw are , it was
extr e m ely im porta nt fo r m e to h ave th e
abilit y to u pdate th e c o nte nt o f a
book q uic kly . S elf - p ublis h in g a llo w s th at.
I re ally b elie ve in o pen so urc e , n ot ju st fo r co de, b ut in g enera l fo r
educa tio nal
co nte nt. I s e lf - p ublis h m y b ooks a lm ost a t c o st a nd I m ake
th em a va ila ble fo r fr e e
dow nlo ad. F or m e, m akin g th e c o nte nt u p-to -d ate
and a va ila ble q uic kly is th e p rio rit y .

More ove r, if I w rit e a b ook, th en it is b eca use I w ant p eople to r e ad it , n ot
beca use
I th in k th ere is a p ro fit to b e m ade. In th e e nd, th e v a lid atio n o f
th e c o nte nt c o m es
fr o m th e re aders a nd n ot fr o m th e p ublis h er. S o I
fo und th at s e lf - p ublis h in g w as id eal
fo r m e. T hat s a id , o nce y o u'r e d one
wit h a b ook, th en y o u d on't w ant to to uch it to o
much . In ste ad, y o u w ant
to w rit e a noth er b ook!
Dris co ll
: D id yo u h ave a ny ch alle nges
th at yo u n eeded to o ve rc o m e
when y o u w ere w rit in g y o ur b ooks?
Di P ie rro
: W ell, fir s t o f a ll, I'm n ot a n ativ e E nglis h s p eake r. S o I c a n
writ e , b ut I te nd
to m ake a lo t o f m is ta ke s. It ta ke s m e fo re ve r to re vie w
th in gs a nd m ake s u re th at
th ey a re fix e d.
Di P ie rro : 'E ven if I c o nsid er m yself a n e xp ert, t h at d oes n ot m ean
th at I k n ow e very th in g
ab out a s u bje ct.'
Anoth er c h alle nge is th at e ve n if I c o nsid er m yse lf a n e xp ert, th at d oes
not m ean
th at I kn ow eve ry th in g about a su bje ct. I alw ays have a
pro ce ss, w hic h is to w rit e
th e c o de fir s t. T hen I lo ok a t th e c o de a nd I tu rn
th e c o de in to a p aper o r a b ook.
In th at w ay, I m anage to m ake th e te xt
co nsis te nt w it h th e c o de e xa m ple s. If y o u c h ange
th e c o de a fte r y o u'v e
writ te n th e te xt, th en s o m etim es th e te xt g ets o ut o f s yn c,
so I r e ally tr y to
make s u re th at m y e xa m ple s a re a s g ood a nd a s c o m ple te a s p ossib le .
One ch alle nge su rro undin g
th e b ook
web2py
w as th at I h ad a lo t o f
people su bm it tin g p ull re quests to th e b ook o n G it H ub. T hey
in it ia lly
co ntr ib ute d by m akin g sm all co rre ctio ns, but now so m etim es th ey
co ntr ib ute
quit e s u bsta ntia lly .
Keepin g tr a ck o f c o ntr ib uto rs w as d if f ic u lt , b eca use I k n ew th eir G it H ub
nam es, b ut
I co uld n't ackn ow le dge th em as people pro perly . P eople
alw ays se nd m e co de, b ut th ey
neve r su bm it th e p ull re quest in th e
ackn ow le dgem ents se ctio n. It's w ork fo r m e to
fig ure out w ho th ese
people a re to a ckn ow le dge th em .
Dris co ll
: S o a s a s cie ntis t, o r a te ach er, h ow
do y o u s e e P yth on h elp in g
th e s cie ntif ic c o m munit y ?

Di P ie rro
: I c a n s e e th at P yth on h as b een g ro w in g a lo t a nd e sp ecia lly
wit h in th e s cie ntif ic
co m munit y . In p artic u la r, I'v e s e en g ro w th w it h a ll o f
th e m ach in e le arn in g stu ff
th at's been co m in g out, su ch as skle arn ,
Te nso rF lo w , a nd K era s.
I re m em ber w hen I s ta rte d te ach in g 1 5 y e ars a go, p eople d id n't k n ow
what P yth on w as.
Som e c o lle agues w ere o bje ctin g to a s w it c h fr o m J a va
to P yth on a s th e p rim ary te ach in g
la nguage. P yth on w as c o nsid ere d b y
many to b e " o nly a s crip tin g la nguage" a nd s o m eth in g
ve ry s p ecia liz e d.
Di P ie rro : 'P yth on w as c o nsid ere d b y m an y t o b e " o nly a s crip tin g
la n guag e" a n d s o m eth in g
very s p ecia liz e d .'
To day, in a lm ost e ve ry cla ss w e te ach , w heth er it 's a n eura l n etw ork
cla ss, a m ach in e
le arn in g cla ss, or a data analy sis cla ss, alm ost
eve ry b ody u se s P yth on. S o th in gs
have re ally ch anged a lo t in th at
re sp ect.
Di P ie rro : 'T he m ajo r p ro ble m I s ee is t h at t h e r e la tio n b etw een
Pyth on 2 a n d P yth on
3 is s till a n is su e.'
The m ajo r p ro ble m I se e is th at th e re la tio n b etw een P yth on 2 a nd
Pyth on 3 is s till
an is su e. A t D eP aul U niv e rs it y , w e u se P yth on 3 a lm ost
eve ry w here , w here as th e in dustr y
still u se s m ostly P yth on 2 e ve ry w here ,
whic h is a p ro ble m s o m etim es.
Anoth er is su e is th at v e ry fe w p eople u se th e n ew a syn c lo gic th at is
ava ila ble in
Pyth on 3 . I th in k P yth on's n ew a syn c lo gic is r e ally p ow erfu l,
but it 's n ot a s fr ie ndly
as J a va S crip t's a syn c lo gic . P eople w ho re ally lik e
eve nt- d riv e n a syn c p ro gra m min g
te nd to p re fe r J a va S crip t (a nd N ode.js )
ove r P yth on.
Di P ie rro : 'I t h in k P yth on's n ew a syn c lo gic is r e ally p ow erfu l, b ut
it 's n ot a s f r ie n dly
as J avaS crip t's a syn c lo gic .'

Dris co ll
: I'm a ctu ally a lit tle b it c o nce rn ed a bout th ese o th er c o m panie s
th at a re sta rtin g
to su pport P yth on 2 . W hat d o yo u th in k is g oin g to
happen to th ese s p lin te r g ro ups,
th at a re fo llo w in g A naco nda o r In te l, if
th ey c o ntin ue to s u pport P yth on 2 in ste ad
of 3 ?
Di P ie rro
: W ell, I d on't a rg ue a bout th e fa ct th at
Pyth on 3 is a b ette r
la nguage th an P yth on 2 , b ut I th in k th at m ig ra tio n fr o m P yth on
2 to
Pyth on 3 is dif f ic u lt . It ca nnot be co m ple te ly auto m ate d and ofte n it
re quir e s
unders ta ndin g th e c o de. P eople d o n ot w ant to to uch th in gs th at
cu rre ntly w ork .
Di P ie rro : 'I d on't a rg ue a b out t h e f a ct t h at P yth on 3 is a b ette r
la n guag e t h an P yth on
2, b ut I t h in k t h at m ig ra tio n f r o m P yth on 2 t o
Pyth on 3 is d if f ic u lt .'
For e xa m ple , th e
str
fu nctio n in P yth on 2 c o nve rts to a s tr in g o f b yte s,
but in P yth on 3 , it c o nve rts
to U nic o de. S o th is m ake s it im possib le to
sw it c h fr o m P yth on 2 to P yth on 3 , w it h out
actu ally g oin g th ro ugh th e c o de
and u nders ta ndin g w hat ty p e o f in put is b ein g p asse d
to th e fu nctio n, a nd
what k in d o f o utp ut is e xp ecte d.
A n aïv e c o nve rs io n m ay w ork v e ry w ell a s lo ng a s y o u d on't h ave a ny
str a nge c h ara cte rs
in y o ur in put ( lik e b yte s e quence s th at d o n ot m ap in to
Unic o de). W hen th at h appens,
yo u d on't k n ow if th e c o de is d oin g w hat it
was s u ppose d to d o o rig in ally o r n ot.
Consid er b anks, fo r e xa m ple . T hey
have h uge c o debase s in P yth on, w hic h h ave b een d eve lo ped
and te ste d
ove r m any y e ars . T hey a re n ot g oin g to s w it c h e asily b eca use it is d if f ic u lt
to ju stif y th at c o st. C onsid er th is : s o m e b anks s till u se C O BO L.
There a re to ols to h elp w it h th e tr a nsit io n
fr o m P yth on 2 to P yth on 3 . I'm
not re ally a n e xp ert o n th ose to ols , s o a lo t o f th e
pro ble m s I s e e m ay
have a s o lu tio n th at I'm n ot a w are o f. B ut I s till fo und th at e ach
tim e I h ad
to c o nve rt c o de, th is p ro ce ss w as n ot a s s tr a ig htfo rw ard a s I w ould lik e .
Dris co ll
: D o y o u s e e P yth on h avin g a ny
ch alle nges in it s a doptio n b y
data s cie nce ?
Di P ie rro
: I th in k th at d ata s cie ntis ts lo ve P yth on. T he m ajo r c o m petit o r is

R a nd I g et th e
im pre ssio n th at R is m ore p opula r a m ong e co nom is ts a nd
sta tis tic ia ns. B ut I d on't
th in k R is m ore p opula r b eca use it 's b ette r, o nly
beca use it h as b een a ro und lo nger
and it is m ore fo cu se d.
R h as b een a ro und fo r a lo ng tim e a nd p eople k n ow w hat th ey c a n d o
wit h R . T he p eople
who k n ow th e la nguage w ell d on't s e e th e n eed to
le arn s o m eth in g d if f e re nt. R h as
alw ays b een fo cu se d o n d ata s cie nce
sp ecif ic a lly , so people in th at co m munit y are
more fa m ilia r w it h th at
la nguage.
Di P ie rro : 'I s ee P yth on b ein g a d opte d m ore a n d m ore a n d
even tu ally b eco m in g m ore
popula r t h an R f o r d ata s cie n ce.'
I w ould c o m pare R n ot s o m uch w it h P yth on a s a la nguage, b ut w it h th e
pandas lib ra ry .
I th in k th at P yth on p lu s p andas m ake s a c o m pellin g c a se
in a c o m paris o n w it h R . T hat,
in fa ct, is w hat I a m u sin g rig ht n ow in a
mach in e le arn in g c la ss. B ut I s e e P yth on
bein g a dopte d m ore a nd m ore
and e ve ntu ally b eco m in g m ore p opula r th an R fo r d ata s cie nce .
I'v e n o
doubt th at w ill h appen.
Dris co ll
: T hank y o u, M assim o D i P ie rro .

C hap te r 7 . A le x M arte lli
A le x M arte lli
is a n Ita lia n c o m pute r e ngin eer. H e is th e a uth or o f th e fir s t
t w o e dit io ns o f
Pyth on in a N uts h ell
a nd th e c o -a uth or o f th e fir s t tw o
e dit io ns o f
Pyth on C ookb ook
a nd th e th ir d e dit io n o f
Pyth on in a N uts h ell
.
A le x is a fe llo w o f th e P yth on S oftw are F oundatio n ( P SF) a nd th e w in ner
o f b oth
th e 2 002 A ctiv a to rs ' C hoic e A w ard a nd th e 2 006 F ra nk W illis o n
M em oria l A w ard fo r c o ntr ib utio ns
to th e P yth on c o m munit y . S in ce 2 005,
h e h as w ork e d fo r G oogle , a nd to day h e is a s e nio r
sta ff e ngin eer a nd
t e ch le ad o f th e te am p ro vid in g co m munit y su pport fo r G oogle C lo ud
P la tfo rm . A le x is a n a ctiv e c o ntr ib uto r to S ta ck O ve rflo w a nd a fr e quent
s p eake r a t
te ch nic a l c o nfe re nce s.
Dis cu ssio n t h em es: P yth on b ooks, v 2.7 /v 3.x , P yth on a t G oogle .
Catc h u p w it h A le x M arte lli h ere : @ ale axi
M ik e D ris co ll
: C ould
y o u g iv e u s a lit tle b ackg ro und in fo rm atio n a bout
y o urs e lf ?
A le x M arte lli
: I g ra duate d in e le ctr ic a l e ngin eerin g b ack in m y h om e
c o untr y , Ita ly . I th en s ta rte d
lo okin g a ro und fo r jo bs w here I c o uld d esig n
i n te gra te d c ir c u it s . D esig nin g o th er
kin ds o f s yste m s s o unded c o ol, b ut
i n te gra te d c ir c u it s w ere w here it w as a t.

At th e tim e, m ost re ally in te re stin g d esig n w as b ein g d one b y A m eric a n
fir m s, s o I
ended u p w it h m y v e ry fir s t jo b b ein g in A m eric a , s p ecif ic a lly
wit h T e xa s In str u m ents
(T I) , w hic h is s till a ro und.
TI w as v e ry p ro m in ent, w it h b oth c o nsu m er p ro ducts a nd a lo t o f v e ry
in te re stin g ch ip s.
We appare ntly were n't ve ry co m patib le th ough,
beca use th e s ty le o f w ork in g in T I in clu ded
sta rtin g a lo t o f p ro je cts a nd
te rm in atin g th em v e ry a bru ptly . I fo und m yse lf in th e
te rm in ate d p ro je ct
te am s o ve r a nd o ve r a gain .
Ale x M arte lli: 'I f o und m yself in t h e t e rm in ate d p ro je ct t e am s o ver
an d o ver a g ain .'
I ca n't b la m e T I fo r
th at. T hey w ere tr y in g to m in im iz e dis ru ptio n in
engin eers ' liv e s, a nd a s th e y o ungest
guy, a nd a n im mig ra nt, I o bvio usly
had n o r o ots in a ny s p ecif ic p la ce . In le ss th an
a y e ar, I e nded u p w ork in g
in D alla s, A ustin , H ousto n a nd L ubbock. T hat's fo ur d if f e re nt
la bs in le ss
th an a y e ar!
It w as a b it s tr e ssfu l, s o I re sta rte d ta lk s w it h IB M R ese arc h th at I h ad
blo cke d
when I g ot th e in te re stin g o ff e r fr o m T I. It's n ot w id ely k n ow n, b ut
IB M u se d to m ake
so m e o f th e m ost in nova tiv e in te gra te d c ir c u it s in th e
busin ess, e sp ecia lly a t re se arc h
le ve l, w here th ey w ould n't b e m ass-
pro duce d, b ut b e p ro ofs o f c o nce pt. IB M s till h as
in cre dib le te ch nolo gy in
th e fie ld .
I re m em ber a ro und th at tim e, IB M g ot a N obel P riz e fo r s p ellin g o ut th e
word IB M in
sin gle ato m s, w it h a ve ry nove l use of an ele ctr o n
mic ro sco pe to p la ce a to m s, ra th er
th an o bse rv e th em . It s till s tr ik e s m e
as a s cie nce fic tio n e ve nt.
IB M , at so m e poin t, decid ed th at it w ante d a re se arc h la b in Ita ly ,
sp ecif ic a lly R om e,
and a ske d fo r v o lu nte ers . O f c o urs e , I v o lu nte ere d. It
would g iv e m e a n in te re stin g
pers p ectiv e a nd g et m e b ack to m y h om e
co untr y , w it h b ette r c a ppuccin os a nd p asta
bein g th e m ain a ttr a ctio ns! S o
I fo und m yse lf b ack in Ita ly in th e 8 0s a nd m y c a re er
ke pt d eve lo pin g
fr o m th ere .

Dris co ll
: H ow d id y o u e nd u p
b eco m in g a c o m pute r p ro gra m mer?
Marte lli
: S o th at w as at IB M . W e had ju st fin is h ed deve lo pin g th is
pro to ty p e im age p ro ce ssin g
mach in e w hic h , fo r th e tim e, w as in cre dib le .
It h ad d edic a te d ch ip s, a b ig fr a m e b uff e r
and a m onit o r th at co st a
fo rtu ne at th e tim e (th ough it w ould be co nsid ere d noth in g
sp ecia l
now adays).
Ale x M arte lli: 'W e h ad ju st f in is h ed d evelo pin g t h is p ro to ty p e im ag e
pro cessin g m ach in e
whic h , f o r t h e t im e, w as in cre d ib le .'
At th e c e le bra tio n fo r th e s u cce ssfu l la unch o f o ur p ro to ty p e, a d ir e cto r
ca m e u p
to m e a nd s a id , " C ongra tu la tio ns to y o u a nd a ll th e te am . It's a
pit y th at th e p ro to ty p e
will n ow b e g ath erin g d ust in a c o rn er." T o w hic h I
re plie d, "W hy sh ould it gath er
dust in a co rn er? W e have at IB M
Rese arc h a lo t o f s cie ntis ts in a ll s o rts o f d is cip lin es,
and th ere 's d em and
fr o m a str o nom ers to g eolo gis ts ."
"Y eah rig ht," h e s a id , "b ut y o ur d evic e d oesn 't s u pport th e p ro gra m min g
la nguages
scie ntis ts u se , s u ch a s F ortr a n a nd A PL. T o u se th e d evic e ,
yo u n eed to w rit e a c h annel
pro gra m ." T he g eolo gis ts a nd a str o nom ers
ju st d id n't d o th ose . It w ould r e quir e a
su bsta ntia l s o ftw are p ro je ct to b uild
all o f th e in te rfa ce s a nd lib ra rie s th ey n eeded.
I th en sa id , "W ell, ca n't w e put to geth er a sm all te am to build th at
so ftw are ?" S o
he ch alle nged m e: "H ow m any p eople d o yo u th in k it
would n eed?"
I w as r e ally k e en to h ave 'm y' m ach in e s e e u se , r a th er th an g ath er d ust,
so I s h ot
ve ry lo w . I s a id , " M ayb e th re e?"
He r e plie d, " O ka y, I c a n
put in th e p eople . S o y o u g o a nd p ut to geth er th e
te am . S how m e s o m eth in g w ork in g
in s ix m onth s."
That's h ow y o u g et to b e a d ir e cto r a t IB M I im agin e. N ot e xa ctly b y
se ttin g lo w b ars .
So I h ad to im pro vis e b eco m in g a s m all- le ve l m anager ( I
th in k te ch nic a l le ad is th e
co rre ct te rm ). I n eeded to te ach m yse lf e nough
so ftw are to s ta rt w rit in g th e c h annel
pro gra m s, in co rp ora tin g th em in to

lib ra rie s, and fin din g out w hat alg orit h m s th ey
wante d in a lib ra ry ,
esp ecia lly th ose w hic h co uld be acce le ra te d by th is ve ry pow erfu l
perip hera l.
Dris co ll
: S o d id
yo u s u cce ed?
Marte lli
: A fte r s ix m onth s, w e h ad a p ro of o f c o nce pt th at b are ly w ork e d,
but w e w ere g iv e n
th e g o-a head to c o ntin ue. In th e e nd, it to ok a c o uple
of ye ars , b ut w e d id d eliv e r
work in g lib ra rie s fo r A PL a nd F ortr a n a s
desir e d. T hat w as a ctu ally v e ry s ig nif ic a nt.
Ale x M arte lli: 'W e d id d eliv er w ork in g lib ra rie s f o r A PL a n d F ortr a n
as d esir e d . T hat
was a ctu ally v ery s ig nif ic an t.'
It m ade th is beautif u l pie ce of hard w are m eanin gfu l. It w as actu ally
usa ble by scie ntis ts
and oth er pro gra m mers fo r pow erfu l im age
pro ce ssin g and vis u aliz a tio n. W it h out th e
in te rm edia te so ftw are , th ey
would n't te ach th em se lv e s th e asse m bly pro gra m min g and
ch annel
pro gra m min g to d o th at.
The p ro ble m , fr o m m y v ie w poin t, w as th at fo r o ve r tw o y e ars , I h ad d one
no h ard w are
desig n a t a ll. I h ad n ot e ve n fo llo w ed w hat w as g oin g o n in
th e fie ld . H ard w are desig n,
esp ecia lly at an in te gra te d cir c u it le ve l,
te nded to g et a bout a re vo lu tio n p er y e ar,
at th e tim e. S o if y o u w ere n't
ve ry m uch o n to p o f th e g am e, th en y o u lo st tr a ck.
Dris co ll
: Is th at w hy y o u
move d to w ard s s o ftw are ?
Marte lli
: W ell, I h ad to re aliz e th at d esp it e m y y e ars o f e xp erie nce , I
co uld b e ru n c ir c le s
aro und b y a ny b rig ht g uy fr e sh o ut o f c o lle ge, w it h
th e la te st te ch nolo gie s a nd to ols
under h is fin gers .
On th e o th er h and, I a ls o h ad to r e aliz e th at e ve n th e m ost s im ple k in d o f
managem ent
and s o ftw are w as a h uge a dded v a lu e to th e s tu ff th at I
re ally w ante d to d o, w hic h
was to m ake co ol syste m s w it h d edic a te d
in te gra te d c ir c u it s .
So, o n th e s lip pery s lo pe a fe w y e ars la te r, I h ad to a dm it th at I w asn 't

actu ally
able to d esig n d ece nt m odern h ard w are a nym ore . It w as m ore
and m ore s o ftw are a nd m anagem ent
all th e w ay. I th in k th ere a re a lo t o f
people in s im ila r s it u atio ns, w ho s ta rt o ut
on th e h ard w are s id e a nd th e n
gra dually r e aliz e th at th eir h ard w are is n 't r e ally s o lv in g
pro ble m s.
Ale x M arte lli: 'A lo t o f p eo ple ...s ta rt o ut o n t h e h ard w are s id e a n d
th en g ra d ually
re aliz e t h at t h eir h ard w are is n 't r e ally s o lv in g
pro ble m s.'
My daughte r is in a sim ila r
sit u atio n now . She's got a Ph.D . in
te le co m munic a tio n e ngin eerin g (a dva nce d ra dio
syste m s) a nd s h e w as
ve ry k e en to fo cu s o n h ard w are . N ow adays, h er w ork in g d ays te nd
to b e
about th re e-q uarte rs s o ftw are . T hat's b eca use e sse ntia lly , a ll n etw ork in g,
more
and m ore d ow n to th e lo w er le ve ls , is s o ftw are -d riv e n.
You d on't d esig n a s p ecia liz e d a nte nna, w hic h w ork s b y it s e lf , w it h n o
in te llig ence
and n o s o ftw are . T hese d ays, y o ur a ppara tu s h as to h ave a
dazzlin g a rra y o f a nte nnas
and e nough in te llig ence to fin d o ut w hic h o nes
sh ould b e a ctiv a te d a t s o m e p oin t,
base d o n th e s ig nal q ualit y . T hat is fa r
beyo nd w hat ra dio m eant b ack w hen I g ra duate d,
but it 's v e ry m uch th e
so ftw are n etw ork in g o f to day.
Dris co ll
: S o h ow d id y o u e nd u p g ettin g
in to P yth on it s e lf ?
Marte lli
: O h, th at's a d if f e re nt fu nny s to ry . Y ears a fte r m y fir s t in tr o ductio n
to th e b eguilin g
world o f s o ftw are , I h ad w rit te n a n e xp erim enta l s yste m ,
on m y o w n tim e a nd u sin g
my o w n e quip m ent, to d eve lo p c e rta in id eas
about th e g am e o f c o ntr a ct b rid ge.
Contr a ct b rid ge w as in ve nte d in th e 1 920s b y H aro ld V anderb ilt . U ntil
about th e tim e
th at I sta rte d d abblin g w it h th e g am e, th ere w as lit tle
math em atic a l th eory o n it .
There w as o ne m ajo r e xce ptio n: É m ile B ore l,
th e g re at
math em atic ia n, w ro te a b ook o n th e m ath em atic a l th eory o f
brid ge.
By th e tim e th at I c a m e a lo ng, c o m pute rs h ad b eco m e s tr o ng, p ow erfu l
and c h eap e nough
to b e u se d fo r r e cre atio nal th in gs, w it h out n ece ssa rily
a b ig p ayo ff . S o I r e su rre cte d
an id ea th at h ad b een fir s t e xp re sse d a s a

th ought e xp erim ent in th e 1 930s, a nd p ut
it in to p ra ctic e o n m y n ew P C .
Ale x M arte lli: 'I r e su rre cte d a n id ea t h at h ad b een f ir s t e xp re ssed a s
a t h ought e xp erim en t
in t h e 1 930s.'
Perh aps I a cte d lik e a ty p ic a l h ard w are g uy tu rn ed to s o ftw are , b eca use
my s o lu tio n
wasn 't e xa ctly o rg aniz e d a s a n ic e p ro gra m min g s yste m ; it
was a h orrid m ix o f s o m any
pro gra m min g la nguages. I lo st c o unt fr o m
Modula -3 to P erl, a nd fr o m V is u al B asic to
Sch em e, b ut th e w hole th in g
work e d!
Dris co ll
: D id th e p ro gra m p la y a lo t o f g am es s u cce ssfu lly ?
Marte lli
: T he p ro gra m a ctu ally p la ye d e ach h and a m illio n tim es a nd
re co rd ed th e re su lt s .
It co nfir m ed th e in cre dib le in tu it io n of Ely
Culb erts o n, w ho w as th e b rig hte st fig ure
of b rid ge b ack in th e 1 920s a nd
1930s.
So I w ro te e ve ry th in g u p a s a r e se arc h p aper a nd s u bm it te d it to th e m ost
pre stig io us
magazin e in th e fie ld : T he B rid ge W orld . T he edit o r w as
enth usia stic and w ork e d w it h
me to va stly im pro ve th e paper. M y
re se arc h w as p ublis h ed in J a nuary a nd F ebru ary
of th e y e ar 2 000, in T he
Brid ge W orld .
Afte r th at, I s ta rte d g ettin g c o m munic a tio ns fr o m b rid ge p la ye rs , in clu din g
ch am pio ns,
askin g m e, " H ey, c a n y o u a pply y o ur th eory a nd y o ur m eth od
to th is p artic u la r p ro ble m
I'm s tr u gglin g w it h ?"
I w as q uit e h appy to a cco m modate th em , e xce pt th at th e w hole th in g w as
so fr a gile
and e ach tim e I c h anged a c o m ma h ere , s o m eth in g b ro ke o ve r
th ere . It w as a m ess! S o
I d ecid ed, d esp it e it b ein g u su ally c o nsid ere d a
tr a p, th at th e w hole s yste m n eeded
to b e r e w rit te n. I w ante d it to b e in , a s
much a s p ossib le , a s in gle la nguage, b ut
exa ctly w hic h s in gle la nguage
was a r e al p ro ble m !
Dris co ll
: S o d id y o u fin d th e
la nguage th at y o u w ere lo okin g fo r?
Marte lli
: T he o nly la nguage w it h e nough p ow er w ould h ave b een L is p . I

honestly a lw ays h ad
a s tr o ng p re dile ctio n fo r S ch em e, b ut m ayb e th at
had s o m eth in g to d o w it h th e h ard w are
backg ro und o f S ch em e it s e lf .
The p ro ble m w as th at th e fr e e e dit io ns th at I c o uld g et, ju st d id n't h ave
enough lib ra rie s
fo r a ll o f th e a uxilia ry ta sks th at I n eeded to d o. It w as a
pers o nal p ro je ct a nd
I w as a lr e ady p ourin g a lo t o f h ours in to it , b ut I
did n't w ant to s p end m oney a s
well. A c o lle ague s a id , "H ey, y o u s h ould
tr y th is b ra nd-n ew la nguage th at's c o m in g
out. It's a ll th e ra ge a nd it 's
kn ow n a s P yth on."
Ale x M arte lli: 'A c o lle ag ue s aid , " H ey, y o u s h ould t r y t h is b ra n d-n ew
la n guag e t h at's
co m in g o ut. It 's a ll t h e r a g e a n d it 's k n ow n a s
Pyth on." '
I s a id , " O h, c o m e o n! I k n ow a t le ast a d oze n la nguages. T he la st th in g I
need is
to le arn y e t a noth er!" H e k e pt in sis tin g, a nd I h ad a lo t o f r e sp ect
fo r th is g uy,
so I fin ally g ave in a nd g ave it a tr y . I s e t m yse lf a lit tle ta sk to
so lv e w it h th is
bra nd-n ew la nguage, to s e e h ow fa r a lo ng I g ot.
Ale x M arte lli: 'I s aid , " O h, c o m e o n! I k n ow a t le ast a d oze n
la n guag es. T he la st
th in g I n eed is t o le arn y et a n oth er!" '
Anoth er th in g th at I d id n't k n ow m uch a bout in th e la te 1 990s w as th e
new fa ngle d 'w eb'.
It se em ed in te re stin g, so I decid ed to deve lo p a
websit e . I ta ught myse lf th e web
te ch nolo gie s, and th e Pyth on
pro gra m min g la nguage, a ll w it h in a w eeke nd! A s I s a id ,
yo u h ave to b e
so m ew hat a m bit io us in th is fie ld if y o u w ant to g et a nyth in g d one!
I s ta rte d h ackin g o n a F rid ay n ig ht a nd k e pt lo okin g a t th e m anual. A t
so m e p oin t,
I s ta rte d lo okin g m uch le ss a t th e m anual, b eca use if I ju st
guesse d how Pyth on w ould
work by analo gy w it h how it w ork e d
els e w here , th en I w as rig ht m ore th an 9 0% o f th e
tim e. T he la nguage
se em ed to b e d esig ned ju st fo r m y b ra in a nd w ork e d e xa ctly th e
way th at
my b ra in d id .

Ale x M arte lli: 'T hat la n guag e s eem ed t o b e d esig ned ju st f o r m y
bra in a n d w ork ed e xactly
th e w ay t h at m y b ra in d id .'
By e arly S atu rd ay a fte rn oon, I w as d one. I h ad a w ork in g C G I a nd w eb
applic a tio n th at
was c o m putin g th e c o ndit io nal p ro babilit ie s o f th e d iv is io n
of s u it s in th e g am e o f
co ntr a ct b rid ge! N ow , w hat c o uld I d o w it h th e r e st
of th e w eeke nd?
I s a id , " I k n ow , it 's g ood, b ut it 's o nly in Ita lia n, a nd th is m ay b e in te re stin g
fo r r e aders in o th er la nguages. L et m e m ake a m ult ilin gual v e rs io n a ls o in
Englis h
or F re nch , w hic h a re tw o o th er la nguages th at I s p eak d ece ntly ."
I re aliz e d th at I n eeded a te m pla tin g s yste m . S o I s n if f e d a ro und fo r a
te m pla tin g
syste m fo r P yth on w it h out m uch s u cce ss. I tr ie d u sin g G ofe r
and o th er to ols o f th e
tim e.
In th e e nd, I d ecid ed to ju st w rit e a
te m pla tin g s yste m m yse lf ! I n am ed it
Yet A noth er P yth on T e m pla te U tilit y ( Y A PTU ).
By S unday, it w as w ork in g
fin e. S o I p acke d it u p, s e nt it to o ne o f th e p la ce s y o u
dis tr ib ute d fr e e
so ftw are b ack th en a nd I h ad m y w ork in g w ebsit e .
Dris co ll
: D id y o u g et a ny in te re st?
Marte lli
: Y A PTU a ctu ally
a ttr a cte d th e a tte ntio n o f a g uy w ho, a t th e tim e,
happened to b e d oin g th e w ebsit e
fo r c o m pute r s cie nce a t th e U niv e rs it y
of C alif o rn ia , B erk e le y. H e fo und Y A PTU to
be th e b est te m pla tin g u tilit y .
He had alr e ady decid ed to use Pyth on and so he m ade
so m e
im pro ve m ents , th en s e nt m e a p atc h file . W e s ta rte d d is cu ssin g th in gs
and th en
made fr ie nds.
Ale x M arte lli: 'W e s ta rte d d is cu ssin g t h in gs a n d t h en m ad e f r ie n ds.
The g uy w as P ete r
Norv ig , w ho is n ow d ir e cto r o f r e searc h a t
Google ...'
The g uy w as P ete r N orv ig , w ho is n ow d ir e cto r
of r e se arc h a t G oogle a nd
auth or of th e bests e llin g pro gra m min g book
Artif ic ia l In te llig ence : A
Modern A ppro ach
. S o P yth on w as a lr e ady s ta rtin g to g iv e m e in te re stin g

co nnectio ns a t th e tim e.
I tr ie d p ush in g P yth on a t w ork , b ut u nfo rtu nate ly w it h out m uch s u cce ss.
Decis io n-m akin g
was in th e h ands o f p ro fe ssio nal m anagem ent a nd th ey
kn ew th at th e fu tu re w as W in dow s.
Noth in g e ls e w ould s u rv iv e , e ve n
th ough o ur p ro gra m s w ere m ostly in te nded fo r U nix
work sta tio ns. It is
tr u e th at th ese d ays, y o u c a n h ard ly b uy a U nix w ork sta tio n a nyw here ;
it 's a ll P C s w it h L in ux o r W in dow s. S o in th at s e nse , th eir v is io n w as
co rre ct.
I d id n't p artic u la rly lik e th e fa ct th at o ur p ro gra m min g la nguages w ere to
be r e str ic te d
to w hat M ic ro so ft r e ally w ante d to s u pport. I c o uld n eve r g et
off ic ia l a ppro va l fr o m
to p m anagem ent. W hat I h ad to d o w as sn eak
Pyth on in to p la ce s w here to p m anagem ent
would n't n otic e , s u ch a s a ll
th e te stin g fr a m ew ork th at w e h ad, w hic h w as a h ack o f
sh ell s crip tin g
haha.bat
file s.
That w as b efo re th e .c m d e ra in W in dow s. T hey a ll b eca m e v e ry u se fu l
and m ain ta in able
Pyth on s crip ts , b ut it w as a lit tle u nsa tis fa cto ry . I w as
sp endin g a ll m y w ork in g
day d ebuggin g p ro ble m s w it h M ic ro so ft F ortr a n
co m pile r, a nd th en d oin g P yth on o nly
in th e rip ple s o f tim e th at I c o uld
ste al h ere a nd th ere .
Dris co ll
: S lig htly d if f e re nt to pic , b ut h ow d id y o u e nd u p
b eco m in g a n
auth or o f b ooks o n P yth on?
Marte lli
: I lo ve d P yth on s o m uch th at I w ante d to g iv e b ack. I w ante d to
pay b ack th e e norm ous
gif t th at G uid o v a n R ossu m a nd e ve ry b ody in th e
Pyth on c o m munit y h ad m ade to m e, a nd
eve ry b ody e ls e , b y d eve lo pin g
th is la nguage.
What co uld I do? Well, th ere was th is Use net gro up ca lle d
co m p.la ng.p yth on, w here
people a ske d a nd a nsw ere d q uestio ns. I h ave
alw ays h ad a k n ack fo r h elp in g p eople
out w it h te ch nic a l q uestio ns. S o,
desp it e bein g a to ta l new bie at th e la nguage, I
sta rte d fo llo w in g.
Wheneve r I n otic e d a q uestio n th at I th ought I c o uld a nsw er p ro ductiv e ly
and c o nstr u ctiv e ly , I d id s o , a nd a ppare ntly w it h a lo t o f s u cce ss!
Ale x M arte lli: 'I h ave a lw ays h ad a k n ack f o r h elp in g p eo ple o ut w it h

te ch nic al q uestio ns.'
Afte r ju st a fe w m onth s, o ne o f th e o ld -tim ers o f th e P yth on c o m munit y
nic kn am ed m e
th e M arte lli B ot. A ppare ntly , I w as th e th ir d "b ot" in th e
Pyth on co m munit y . T he p oin t
bein g th at a h uge a m ount o f a nsw ers ,
whic h w ere a lw ays c o rre ct, q ualif ie d y o u a s a
bot. T he g uy w ho c a m e u p
wit h th e fu nny n ic kn am e, b y th e w ay, w as S te ve H old en, a nd
I'm h onore d
to s a y th at h e is o ne o f m y c o -a uth ors o n m y la te st b ook: th e th ir d e dit io n
of
Pyth on in a N uts h ell
.
So a nyw ay, th is g ain ed m e s tr e et c re dib ilit y in th e P yth on c o m munit y , a nd
gave m e
th e c o ura ge to g et in to uch w it h O 'R eilly , n otic in g th at th ere w as
no
Pyth on in a N uts h ell
. I sa id , "H ey, m ayb e I, p erh aps w it h a m ore
exp erie nce d c o -a uth or, c o uld d o s o m eth in g
about it ? "
They s a id , "W hy d o y o u n eed a c o -a uth or? S end u s a s a m ple c h apte r
and a c h apte r p la n."
It d eve lo ped fr o m th ere .
Ale x M arte lli: 'I s aid , " H ey, m ayb e I, p erh ap s w it h a m ore
exp erie n ced c o -a u th or,
co uld d o s o m eth in g a b out it ? "'
Dris co ll
: H ow d id y o u fin d
writ in g
Pyth on C ookb ook
?
Marte lli
: I h ad to ta ke a lit tle d eto ur to c o -w rit e
Pyth on C ookb ook
, w hic h
had lo st a n a uth or in th e m id dle o f e arly p la nnin g. It w as fu n b eca use
th ose
were re cip es fr o m th e c o m munit y , b ut re phra se d a nd a dapte d to
actu ally u se fu lly a ddre ss
th e s illy p ro ble m .
I c o ntr ib ute d a lo t o f re cip es o n th e A ctiv e S ta te s it e a s w ell. T hat w as
alw ays fu n!
That w as th e equiv a le nt of w hat w ould now be S ta ck
Ove rflo w . Q uestio ns a nd a nsw ers
on te ch nic a l is su es a bout a s p ecif ic
to pic h ave b eco m e w ell- s e rv e d b y S ta ck O ve rflo w .
I a m v e ry a ctiv e o n
th ere : I'm th e s e co nd to p p oste r o n th e P yth on ta g, a nd fr o nt
page to p
0.0 01% in r e puta tio n.
In cid enta lly , S ta ck O ve rflo w 's ch ie f d ata scie ntis t h as ju st p ublis h ed a
stu dy about
th e popula rit y of pro gra m min g la nguages, and how it

ch anges w it h tim e b ase d o n ta gs
and q uestio ns o n S ta ck O ve rflo w . T he
la nguage w it h th e fa ste st g ro w in g p opula rit y
is P yth on.
Ale x M arte lli: 'T he f o re cast is t h at P yth on w ill b eco m e t h e m ost
popula r p ro gra m min g
la n guag e a n d t h e o ne w it h t h e m ost a ctiv e
develo pers b y e arly 2 019.'
The fo re ca st is th at P yth on w ill b eco m e th e m ost p opula r p ro gra m min g
la nguage a nd
th e o ne w it h th e m ost a ctiv e d eve lo pers b y e arly 2 019.
Rig ht now , it 's ju st belo w
Ja va and Ja va S crip t, but it has passe d
eve ry th in g e ls e . P erl h as d is a ppeare d, R uby
has d is a ppeare d, a nd C # is
goin g d ow n s h arp ly . O nly J a va a nd J a va S crip t h old , b ut
th ey'r e v e ry fla t,
while P yth on is g ro w in g g angbuste rs .
Ale x M arte lli: 'O nly J ava a n d J avaS crip t h old , b ut t h ey'r e v ery f la t,
while P yth on
is g ro w in g g an gbuste rs .'
There is a 2 7% y e ar-o ve r-y e ar g ro w th in v o lu m e fr o m a la rg e b ase . I
fo und th at a n
in te re stin g c o nfir m atio n o f th e a rtic le e arlie r th is y e ar, fr o m
Spectr u m M agazin e,
whic h p ro cla im ed P yth on to b e th e m ost p opula r
pro gra m min g la nguage th is y e ar.
That w as b ase d o n a k in d o f s u bje ctiv e m ix o f v e ry d if f e re nt in dic a tio ns,
su ch a s
jo b o ff e rs , c o urs e s, a nd s e m in ars . W here as S ta ck O ve rflo w 's
stu dy w as to ta lly q uantit a tiv e ,
to ta lly o bje ctiv e , a nd ju st b ase d o n a n
in cre dib ly la rg e v o lu m e o f d ata . T hey b oth
ca m e to e xa ctly th e s a m e
co nclu sio n, e xce pt th at S ta ck O ve rflo w , o f c o urs e , c o uld
quantif y th in gs
much b ette r a nd m ore p re cis e ly .
Dris co ll
: S o co uld yo u describ e anyth in g th at yo u'v e
le arn ed as an
auth or o f b ooks?
Marte lli
: W ell, fir s t o f a ll, n o m atte r h ow w ell yo u th in k yo u kn ow a
la nguage, y o u'r e p ro bably
wro ng u ntil y o u'v e w rit te n a c o uple o f b ooks in
th at la nguage.

Id eally , y o u w rit e w it h th e c o opera tio n o f a p atie nt, b ut fir m , e dit o r w hose
ro le
is k n ow in g th e la nguage, h ow it lo oks o n th e p rin te d p age, a nd h ow
re aders w ill a bso rb
it .
Of co urs e , E nglis h is m y th ir d la nguage, so I n eve r th ought I h ad a
partic u la rly s tr o ng
cla im to h avin g a c o m mand o f it . B ut w rit in g th e b ooks
im pro ve d m y u nders ta ndin g o f
exa ctly w here , a t le ast in w rit te n E nglis h ,
th e p ro ble m s a re .
Ale x M arte lli: 'W e'l l k eep u sin g p ro gra m min g la n guag es b ecau se o f
th e in here n t a m big uit y ,
pow er, a n d d if f ic u lt y o f n atu ra l la n guag e.'
It's a m azin g h ow
p ow erfu l, ric h , a nd d if f ic u lt a to ol n atu ra l la nguage is .
That's w hy w e'l l ke ep u sin g
pro gra m min g la nguages: b eca use o f th e
in here nt am big uit y , pow er, and dif f ic u lt y of
natu ra l la nguage. It's
im possib le to e xp re ss th in gs w it h a bso lu te p re cis io n th ere .
Dris co ll
: C an y o u g iv e a n e xa m ple ?
Marte lli
: T here w as a n a necd ote I r e ad o nce in th e m ailin g lis t, a bout th e
ris ks of auto m atio n
and co m putin g. It w as about a fo rm ally -d efin ed
syste m to ro ute a m bula nce s in a la rg e
urb an a re a. S o o bvio usly it w as
lit e ra lly a lif e -a nd-d eath ta sk.
One o f th e th in gs w rit te n d ow n o rig in ally in n atu ra l la ngua ge, a nd o ne o f
th e c o nstr a in ts ,
was th at w hen a c a ll to th e e m erg ency n um ber c a m e,
and th e s ym pto m s w ere id entif ie d
as th ose o f a s tr o ke , a n a m bula nce
would b e th ere in n o m ore th an 1 5 m in ute s (th e
maxim um tim e th at
would s till g iv e y o u a g ood c h ance ).
When th e s yste m w as tr a nsla te d fr o m n atu ra l la nguage to p ro ve n c o rre ct
pro gra m min g,
many th in gs im pro ve d, e xce pt th at th ere w ere a s m all, b ut
worry in g, n um ber o f c a se s
where th e a m bula nce h ad b een s ch edule d
and th en it n eve r s h ow ed u p. S o w hat h appened
was n atu ra l la nguage
ju st d id n't m ap in to fo rm al lo gic .
Ale x M arte lli: 'N atu ra l la n guag e ju st d id n't m ap in to f o rm al lo gic .'

Rem em ber, it w as a n u rb an a re a, w it h tr a ff ic . A lt h ough a n a m bula nce
may h ave b een
bla stin g it s s ir e ns, it m ay still h ave b een b lo cke d fo r
min ute s and m in ute s. If th is
happened, w hen 15 m in ute s and 0.0 1
se co nds had passe d, th e syste m deduce d th at th e
am bula nce m ust
alr e ady have arriv e d, beca use one of th e postu la te s is th at th e
am bula nce
alw ays a rriv e s in le ss th an 1 5 m in ute s. S o if a n a m bula nce
had a lr e ady a rriv e d, it
would h ave b een u se le ss to s e nd a noth er o ne
th ere to o. T his m eant th at it g ot r e ro ute d.
In n atu ra l la nguage, w hen w e s a y th at th e a m bula nce m ust b e th ere in
le ss th an 1 5
min ute s, it 's n ot a p ostu la te b eca use it 's a sp ir a tio nal. W hat
we re ally m ean is it 's
abso lu te ly im porta nt a nd b y a ll m eans, p le ase g et
th e a m bula nce th ere th at fa st. It
doesn 't m ean if y o u d on't m ake it , th en
fo rg et it b eca use 1 5 m in ute s a nd 1 s e co nd
is u se le ss. It's u ndesir a ble ,
but b ette r th an n oth in g!
Ale x M arte lli: 'W hen y o u'r e in a p ro gra m min g la n guag e, y o ur
assertio n is m uch s im ple r:
yo u s ay w hat h ap pen s.'
That's o ne tin y e xa m ple o f h ow n atu ra l la nguage tr ip s y o u u p a ll th e tim e.
When y o u'r e
in a p ro gra m min g la nguage, y o ur a sse rtio n is m uch s im ple r:
yo u s a y w hat h appens. If
th is is n 't tr u e, th en y o u ra is e a n e xce ptio n. In
natu ra l la nguage, th ere 's s o m uch
backg ro und th at y o u ta ke fo r g ra nte d
in evit a bly . T his in clu des a ll c o m mon k n ow le dge
and w hat it m eans to b e
a h um an b ein g in th is c u lt u re .
Dris co ll
: S o c a n y o u d escrib e a ny o f y o ur m ost in te re stin g in te ra ctio ns
wit h th e r e aders o f
yo ur b ooks?
Marte lli
: T here h ave b een a fe w ! I'm p ro bably
th in kin g s o m e o f th e m ost
in te re stin g o nes w ere a t w ork , w here a c o lle ague w ould
co m e u p to m e
and s a y, " S o, I'm o bse rv in g th is s tr a nge b ehavio r o f..." s o m e p ro gra m
or
fu nctio n th ey h ad ju st w rit te n.
I w ould ta ke a lo ok a nd s p ot th e p ro ble m a nd h elp th em to fix it . T hat w as
not s o
much b ase d o n m e k n ow in g P yth on a ny b ette r, b ut o n m e h avin g
what I c a ll
debugger e ye s
. If y o u g iv e m e a p age o f te xt w it h o ne ty p o, fo r
so m e re aso n I s e e th e ty p o b efo re
I s e e th e c o nte xt o f a nyth in g e ls e .

That is a ctu ally v e ry h elp fu l in p ro gra m min g,
as it is in c ir c u it d esig n.
People u se d to s a y, "S o, I a lw ays m eant to a sk y o u, a re y o u th e A le x
Marte lli w ho
wro te th at b ook? " It w as k in d o f fu n to s a y, " Y eah, th at w as
me, in m y c o pio us s p are
tim e!"
Ale x M arte lli: 'Y ou n eed k u dos t o o, n ot ju st h ard -c o re r e su lt s .'
That k in d o f m ade m y d ay. It d oesn 't h appen m uch a nym ore , b eca use
I'v e b een a t m y
cu rre nt e m plo ye r fo r 1 2 a nd a h alf y e ars a nd p eople
sta rte d to k n ow m e w ell e nough.
I m ean it 's n ot o bje ctiv e ly p ro ductiv e ,
but h ey! Y ou n eed k u dos to o, n ot ju st h ard -c o re
re su lt s .
Dris co ll
: S o d o y o u th in k
th at P yth on 2 .7 is d ead?
Marte lli
: T he th ir d e dit io n o f
Pyth on in a N uts h ell
h ad a p ro ble m . I th in k
we w ere r ig ht th at P yth on 2 .7 is fa r fr o m d ead.
Pro bably , th e v a st m ajo rit y o f th e lin es o f P yth on c u rre ntly d eplo ye d in
pro ductio n
are P yth on 2 .7 , o r o th er P yth on 2 v e rs io ns, b ut th ose c o uld
move to 2 .7 w it h h ard ly
any e ff o rt. S o o bvio usly P yth on 2 .7 is n ot g oin g
anyw here . It's a ctu ally p ro bably
goin g a w ay in 2 020 w hen th e P yth on
Softw are F oundatio n (P SF) o ff ic ia lly sto ps su pportin g
it (th ough I b et
so m e e ntr e pre neurs w ill o ff e r o ngoin g s u pport o n a c o m merc ia l b asis ).
So it w as c ru cia l to a ls o c o ve r P yth on 3 , 3 .5 , a nd 3 .6 , w hic h w ere th e
re ce nt re le ase s
and fo rth co m in g re le ase s a s w e p la nned a nd w ro te th e
book.
Ale x M arte lli: 'P yth on 2 .7 is f a r f r o m d ead .'
It's to o e arly rig ht n ow to d ro p 2 .7 . S o w e h ave a b ook th at c o ve rs b oth ,
and th at
make s it r e dundant if y o u o nly c a re a bout o ne o f th em . T hat's a
pro ble m th at w ill
go a w ay b y th e n ext e dit io n. O f co urs e , w e w ill b e
Pyth on 3 s o m eth in g o nly a nd n o
2.7 n eed a pply .
A lo t o f s tu ff w ill re m ain in 2 .7 , p ro bably b eca use it 's ju st to o m uch o f a

co de base .
YouT ube, fo r exa m ple , is esse ntia lly a P yth on syste m .
There 's m illio ns o f lin es o f
su per-o ptim iz e d 2 .7 a nd h one stly , it 's to o h ard
to ju stif y m ig ra tin g it a ll fr o m a
busin ess s ta ndpoin t. W e c a n't s a y le t's
re w rit e X m illio n lin es o f c o de, g iv e n th e
am ount o f o ptim iz a tio n th at h as
gone in to Y ouT ube fo r m ore th an 1 0 y e ars .
If re w rit in g w ere to s lo w Y ouT ube d ow n b y 1 0% , c a n y o u q uantif y th e
co st o f th at,
not ju st to G oogle , b ut to e ve ry b ody, w hat w it h Y ouT ube
tr a ff ic m akin g u p s o la rg e
a fr a ctio n o f th e in te rn et's b andw id th ? A 1 0%
perfo rm ance im pact w ould s e ve re ly m ake
lif e w ors e fo r e ve ry b ody. W e
ca n't a ff o rd th at! S o th at'l l g o b y o th er d ir e ctio ns.
Dris co ll
: S o w hat a re s o m e o f
Pyth on's c u rre nt p ro ble m s a s a la nguage?
Marte lli
: S o, if I h ad a m agic w and a nd c o uld g o b ack to ju st b efo re th e
fir s t v e rs io n o f
Pyth on w as p ublis h ed, a nd c o uld m ake o nly o ne c h ange, I
would m ake it c a se in se nsit iv e .
Ale x M arte lli: 'M an y o f t h e b est la n guag es w ere c ase in sen sit iv e.
That, t o m e, w ould
be t h e g re ate st im pro vem en t.'
I kn ow sin ce th e C p ro gra m min g la nguage ca m e a nd d om in ate d th e
sce ne, p eople th in k
of c a se in se nsit iv e a s w eir d . B ut fr o m F ortr a n, to
Pasca l, to A da, m any o f th e b est
la nguages w ere c a se in se nsit iv e . T hat,
to m e, w ould b e th e g re ate st im pro ve m ent.
You m ay n ot n otic e it s o m uch in a W este rn c u lt u re , b ut th e v e ry c o nce pt
of lo w erc a se
and u pperc a se is c o m ple te ly a rtif ic ia l. T hey a re v e ry m uch
an a rtif a ct o f o ur cu lt u re
and o f h ow w e h appen to h ave d eve lo ped
writ in g.
I lo ve d th e M acin to sh file syste m , beca use w hen yo u cre ate d a file
upperc a se F -O -O
( FOO
), it p re se rv e d th at ca se . B ut if yo u lo oke d fo r
lo w erc a se
foo
, it s till g ave y o u th e file . T his is m uch m ore lik e ly to b e
what y o u w ant a s a h um an
bein g.
Ale x M arte lli: 'V oic e in put h as s u dden ly b eco m e a n a b so lu te ly m ajo r

ap pro ach t o in put.'
Thin k o f th e v o ic e re co gnit io n s yste m . V oic e in put h as s u ddenly b eco m e
an a bso lu te ly
majo r a ppro ach to in put, b eca use p hones m ake it s o m uch
easie r to s p eak to th em , th an
to u se th eir lit tle ke yb oard s. H avin g to
main ta in c a se d is tin ctio n is a k ille r in
th at s it u atio n a nd s h ow s u p h ow
to ta lly a rtif ic ia l it is ! S pecif y in g u pperc a se o r
lo w erc a se is ju st n ot n atu ra l
pro nuncia tio n.
I fin d m yse lf in a tin y m in orit y w is h in g fo r c a se in se nsit iv e P yth on. It's tr u e
th at
ju st a bout e ve ry la nguage th at c o m pete s w it h P yth on is a ls o c a se
se nsit iv e , s o I g uess
it 's a d efe ct s h are d b y ju st a bout e ve ry p opula r
la nguage to day.
Som eth in g th at P yth on does dif f e re ntly fr o m oth er la nguages, and it
would b e a b ette r
la nguage if it d id it th e s a m e w ay, is o ne o f th e P yth on
ke yw ord s. O ne o f th e m ost
popula r k e yw ord s is
def
, w hic h is u se d to
defin e a fu nctio n. T he p ro ble m is it 's n ot a k e yw ord a nd it 's n ot
a w ord . It
doesn 't m ean a nyth in g! Y ou k n ow w hic h la nguage d oes it rig ht th ere ?
Ja va S crip t.
Dris co ll
: H ow d oes
J a va S crip t d if f e r?
Marte lli
: T he e quiv a le nt k e yw ord is
function
. I c a n't im agin e w hy P yth on
did n't u se
function
to s ta rt w it h . It's s o o bvio us!
function
is fo ur m ore
ch ara cte rs to ty p e, b ut b ig d eal! A ny e dit o r w ill A uto C om ple te fo r y o u,
rig ht?
I kn ow te ch nic a lly sp eakin g, sa yin g
def foo
or
function foo
m ake s
abso lu te ly no dif f e re nce . B ut I fo cu s on th e ve ry lit tle usa bilit y and
unders ta ndabilit y
glit c h es.
Ale x M arte lli: 'P yth on is p ossib ly t h e m ost u sab le a n d m ost
unders ta n dab le p ro gra m min g
la n guag e t h ere h as e ver b een .'
Pyth on is possib ly th e most usa ble and most unders ta ndable
pro gra m min g la nguage th ere
has e ve r b een. S o th ose fe w p la ce s w here

it is n 't k in d o f s ta nd o ut m ore .
Pyth on h as o nly o ne k in d o f ra nge a nd it 's a lw ays g oin g to b e u pper
bound e xclu ded,
so it 's m uch m ore c o nsis te nt a nd m uch m ore c le ar. T he
pla ce s w here a c o m ple te ly a rb it r a ry
word , s u ch a s
def
, is u se d is w here
th e la nguage c o uld h ave b een ju st a s e asily d esig ned to u se a re adable
word lik e
function
.
If p eople w ere c o m ple te ly te rrif ie d b y th e lo ng w ord
function
, I w ould
allo w 'f u n'. It's k in d o f a jo ke . A fte r a ll, th e la nguage is n am ed
afte r M onty
Pyth on, s o y o u c a n ta ke 'f u n' a s a n a bbre via tio n o f
function
, o r s im ply
se le ct it b eca use u sin g P yth on is fu n. It w ould s till b e b ette r th an
def
.
Dris co ll
: W hat d o y o u th in k a re
P yth on's g re ate st s tr e ngth s?
Marte lli
: I a ctu ally a nsw ere d th is o ne w hile d ealin g w it h th e g lit c h es. T he
str e ngth s a re
th e c la rit y a nd c o nsis te ncy o f P yth on a nd th e a sp ir a tio nal
goal th e la nguage h as,
to h ave o nly o ne n atu ra l a nd o bvio us w ay to d o
th in gs.
We ca n't q uit e g et th ere o f co urs e , b eca use fo r e xa m ple , a ddit io n is
co m muta tiv e ,
so
a + b
a nd
b + a
a re tw o w ays to e xp re ss th e s u m a nd
Pyth on ca nnot ch ange th at. B ut it 's a sp ir a tio nal
and it re ally h elp s to
make so m ebody e ls e 's co de m uch m ore re adable to yo u o n th e
fir s t
pass.
If th ey'r e a t a ll a g ood P yth onis ta , o r e ve n a b egin ner, th ey w ill in m ost
ca se s h ave
ch ose n th e o ne o bvio us w ay, b eca use it d oes te nd to b e
obvio us. W here th ey h ave n't ,
and y o u s h ow th em w hat it w ould h ave
been, it 's m uch e asie r to co nvin ce th em . S o th is
kin d o f a sp ir a tio nal
atte m pt to g iv e o ne o bvio us w ay to e xp re ss th in gs is p art o f
what m ake s
th e la nguage s o c le ar, s o u se fu l a nd s o u sa ble .
Ale x M arte lli: 'T his k in d o f a sp ir a tio nal a tte m pt t o g iv e o ne o bvio us
way t o e xp re ss
th in gs is p art o f w hat m akes t h e la n guag e s o c le ar,
so u sefu l a n d s o u sab le .'
The fa ct th at P yth on has exte nded to be use d in ju st about eve ry

applic a tio n n ic h e
yo u c a n th in k o f, I b elie ve d esce nds fr o m th is c la rit y a nd
co nce ptu al s im plic it y .
It r e ally m ake s it e asy to ju m p a board .
Not e ve ry b ody's b ra in w ill b e s u ch a p erfe ct m atc h fo r P yth on a s m in e is .
I'm not
sa yin g eve ry exp erie nce d pro gra m mer w ill te ach th em se lv e s
Pyth on w it h in o ne w eeke nd,
but it 's a la nguage w here it c a n h appen.
Desp it e lik in g a lo t o f th in gs in o th er la nguages,
su ch a s R ust, I c a n't
im agin e s o m ebody d oin g th e s a m e in R ust in a w eeke nd.
Dris co ll
: S o w here d o y o u s e e
Pyth on g oin g in th e fu tu re ?
Marte lli
: E ve ry w here ! Y ou k n ow , o ne o f th e g re ate st s cie ntif ic re su lt s o f
th e la st fe w y e ars
was th e d is co ve ry o f g ra vit a tio nal w ave s.
We h ad a c o uple o f k e yn ote s a t th e P yC on Ita lia c o nfe re nce . P yth on
co de was th ere
as th e co m mon la nguage to co ntr o l all of th e
in str u m enta tio n re sp onsib le fo r gath erin g
th e data , w hic h eve ntu ally
sh ow ed th at tw o b la ck h ole s w ere s la m min g in to e ach o th er
and s e ndin g
out th ose w ave s.
Ale x M arte lli: 'P yth on w as t h ere d ir e ctin g t h e d ata p ro cessin g.'
In cid enta lly , if I r e ca ll c o rre ctly , fo r s e ve ra l s e co nds ju st th e w ave s s e nt b y
th at
one e ve nt p ro duce d m ore e nerg y th an a ll th e re st o f th e u niv e rs e
was s e ndin g to geth er.
That's q uit e a p henom enon a nd P yth on w as th ere
dir e ctin g th e d ata p ro ce ssin g. T hat
is , o ve rs e ein g a ll o f th e cle anin g,
analy sis , a nd c o rre la tio n o f th ose m easu re m ents ,
to in te rp re t th em a s a n
in cre dib ly p ow erfu l s h ort- d ura tio n e ve nt, in cre dib ly fa r a w ay.
That c la sh
happened b illio ns o f y e ars a go a nd it 's ju st th e w ave s th at a re g ettin g
here r ig ht n ow . T hat's o ne e xa m ple .
Scie nce , o f c o urs e , is fa scin atin g b eca use o f th at. M ore a nd m ore I e nd
up c h attin g
wit h b ig in te rn et c o m panie s th at s till p re fe r to , fo r th eir c o re
applic a tio ns, u se
oth er p ro gra m min g la nguages. T hey d o th is b eca use
th at's w hat th e fo under k n ew , a nd
th ey h ave to a cco m modate P yth on
only b eca use th ey b uy o th er c o m panie s.
A lo t o f p urc h ase s a re g oin g o n in th e h ig h-te ch fie ld . M ore o fte n th an n ot,

th ose
oth er c o m panie s a re u sin g P yth on, b eca use th at's p art o f w hat
make s th em s u cce ssfu l.
They'r e tw ic e , o r th re e tim es m ore p ro ductiv e
th an th e g uys w ho a re u sin g le sse r la nguages.
Dris co ll
: D o y o u th in k m ore c o m panie s w ill s ta rt u sin g P yth on?
Marte lli
: Y es, a ny b ig
co m pany n eeds to a dopt P yth on a s o ne o f th e
th in gs a dm it te d in it s p ro ductio n syste m s.
The la unch of Te nso rF lo w
sh ow ed to m e th at P yth on w ill d efin it e ly b e th ere a t th e
fo re fr o nt o f
mach in e le arn in g a nd a rtif ic ia l in te llig ence .
Eve n if th e in te rn als a re in s u per-o ptim iz e d C ++ a nd a sse m bly la nguage,
at th e a pplic a tio n
le ve l th e b usin ess lo gic w ill b e in P yth on, b eca use it
make s no se nse to sp end th e
energ y to re m ake it oth erw is e . So
Te nso rF lo w is P yth on a t th e c o re .
Ale x M arte lli: 'T he la u nch o f T en so rF lo w s h ow ed t o m e t h at P yth on
will d efin it e ly
be t h ere a t t h e f o re fr o nt o f m ach in e le arn in g a n d
artif ic ia l in te llig en ce.'
I c a nnot im agin e n ic h es w here P yth on w ill n eve r b e. B ut le t's d is cu ss th e
exce ptio n:
em bedded syste m s. P yth on tr a dit io nal im ple m enta tio ns a re
not in cre dib ly s p are u se rs
of m em ory . In a n e m bedded s yste m , y o u n eed
to h ave th at. H ow eve r, if n ot P yth on it s e lf ,
so m e d ia le ct c a n a ddre ss th at
pro ble m .
Specif ic a lly , th e d ia le ct o f P yth on th at a ddre sse s th e e m bedded la nguage
devic e p ro gra m min g
In te rn et o f th in gs w orld is k n ow n a s M ic ro P yth on.
The B BC , I h ear, is d is tr ib utin g,
or has dis tr ib ute d, so m eth in g lik e a
millio n d evic e s r u nnin g M ic ro P yth on to s ch oolc h ild re n.
Dris co ll
: S o is th is P yth on?
Marte lli
: It's n ot fu ll P yth on, b eca use
it h as to p ut s o m e c o nstr a in ts o n
mem ory u se .
You c a nnot ju st d yn am ic a lly a llo ca te m em ory in a tw o-d olla r d evic e . It's
got to h ave
64K , o r a fix e d a m ount o f m em ory . B ut y o u c a n s till, w it h

so m e lim it a tio ns about th is
dyn am ic allo ca tio n, do a lo t of yo ur
pro gra m min g.
There are so m e im ple m enta tio n pecu lia rit ie s th at in th e past have
blo cke d P yth on fr o m
so m e a pplic a tio ns, b ut th ey'r e b ein g a tta cke d. I
kn ow th at Larry H astin gs is sla vin g
aw ay at re m ovin g th e G lo bal
In te rp re te r L ock (G IL ). D esp it e w hat p eople th in k, th e
GIL is ir re le va nt to
90% o f a pplic a tio ns, b ut it is a k ille r fo r th e 1 0% w hic h d esp era te ly
need
to u se th e in cre asin g n um ber o f c o re s th at c h ip m anufa ctu re rs s tu ff in .
If y o u h ave a n a lg orit h m o ptim iz e d to u se a ll o f th e 3 2 o r 6 4 c o re s, th en
re m ovin g
th e G IL w ill m ake a huge dif f e re nce fo r th at tin y nic h e.
Gra dually , th e lim it a tio ns
will g o a w ay.
Ale x M arte lli: 'A t t h e h eart o f o pera tin g s yste m s, I d o n ot b elie ve
we'l l s ee m uch
more P yth on t h an w e d o t o day.'
At th e h eart o f o pera tin g s yste m s, I d o n ot b elie ve w e'l l s e e m uch m ore
Pyth on th an
we do to day. Pyth on co uld be th ere w here dyn am ic
allo ca tio n is o ka y, b ut th at's a
sm all p art o f a k e rn el. M ayb e s o m e d evic e
driv e rs th at a re n ot tim e-c rit ic a l c a n d o
th at. B ut m ostly , I s e e P yth on a s
ru nnin g in u se r s p ace , n ot in k e rn el s p ace .
Dris co ll
: W hy is th at?
Marte lli
: T he k e rn els w ill
need lo w er-le ve l la nguages, a nd in cid enta lly
th ey a re d esp era te ly s ta rtin g to n eed
bette r o nes th an C , w hic h is w hy I'm
lo okin g in to R ust.
I w ould r e ally lik e to s e e a n e xp erim enta l a nd s im ple O S k e rn el w rit te n in
Rust. A nyw ay,
it c e rta in ly h as th e p ote ntia l fo r it . P yth on d oesn 't re ally ,
beca use o f m em ory a llo ca tio n.
Als o , th e M ic ro P yth on tr ic k d oesn 't re ally
work a ll th at w ell, b eca use y o u d o n eed
so m e d yn am is m . C ontr o llin g
pagin g is re ally h ard th ere . B ut a part fr o m th at s u per
hard , s u per c o re
le ve l, I d o n ot s e e a ny lim it . I c a n't e ve n s a y th e s ky's th e lim it
beca use
gra vit a tio nal w ave s a re v e ry m uch in th e s ky, y e t w e c o nquere d th ose .

Ale x M arte lli: 'I c an 't e ven s ay t h e s ky's t h e lim it b ecau se
gra vit a tio nal w aves a re
very m uch in t h e s ky, y et w e c o nquere d
th ose.'
The o nly th in g I c a n th in k o f is th at w e s till h ave a w ay to g o w it h m obile
deve lo pm ent
wit h P yth on. I h ear g ood th in gs, b ut I h ave n o p ers o nal
exp erie nce w it h K iv y.
It's a r e al p it y , b eca use I r e m em ber G uid o c h attin g w it h A ndy R ubin w hen
th ey w ere
both a t G oogle , a nd tr y in g to c o nvin ce A ndy th at b eyo nd J a va ,
Andro id needed an applic a tio n-le ve l
pro gra m min g la nguage th at w as
much e asie r to u se . A ndy s tu ck to h is id ea th at a ddin g
more la nguages
make s th in gs h ard er fo r p ro gra m mers . It's n ot tr u e! U nfo rtu nate ly ,
Andy
was th e one in ch arg e of th e pro je ct, so G uid o co uld n't m ake any
headw ay. B ut
it w ould b e a d if f e re nt w orld if I'd m anaged to b e m ore
co nvin cin g s o m ehow .
Dris co ll
: S o w hat's it lik e to w ork a t G oogle ?
Marte lli
: I h ave fo und it a ll I
hoped fo r w hen I in te rv ie w ed th ere 1 3 y e ars
ago a nd p ossib ly m ore !
Of c o urs e , fo r m e, it h as b een th e c u lm in atio n o f a lo ng a nd v e ry v a rie d
ca re er. S o
my e xp ecta tio ns w ere n ot th e s h in y-e ye d o nes o f s o m ebody
fr e sh o ut o f s o m e c o lle ge.
They w ere te m pere d b y h avin g o bse rv e d w hat
happens in re alit y in fir m s o pera tin g in
th e m ark e tp la ce . N eve rth ele ss, it
got e asily s u rp asse d a nd I'm n ot e ve n s u re it 's
so m uch a bout th e fir m ,
beca use it 's a bout th e p eople . W ell o ka y, a fir m is m ade u p
of it s p eople .
The people bein g abso lu te ly in cre dib le is what m ake s th e pla ce
abso lu te ly
in cre dib le .
In th e e nd, th e s e cre t is to h ave a b unch o f a w eso m e p eople ! N ow th at
was p ro bably
easie r w hen G oogle h ad 7 0 e m plo ye es, r a th er th an 7 0,0 00.
I m ean, I'm n o t s a yin g it 's
easy to fin d 7 0 g re at p eople , b ut it 's c e rta in ly
hard er to fin d 7 0,0 00! It d oesn 't
have to b e 1 00% I g uess, b ut it s h ould b e
clo se to 1 00% a w eso m e p eople .
Ale x M arte lli: 'I n t h e e n d, t h e s ecre t is t o h ave a b unch o f a w eso m e

peo ple !'
By a w eso m e p eople , I d on't
nece ssa rily m ean ju st b rillia nt. I'm s u re it 's
much e asie r to fin d b rillia nt p eople
th an to fin d th e rig ht k in d o f p eople ,
who ca re fo r th e e nd-u se rs , th eir co lle agues
and th eir p artn ers o n a
hum an le ve l. I m ean it 's im porta nt b ein g b rig ht a nd e ve ry th in g,
but a
brig ht a ssh ole c a n d o m ore d am age th an a d im o ne, rig ht? S o w hat y o u
want fir s t
is th e p eople w ho c a re : p eople w ho a re e m otio nally in ve ste d in
th e s u cce ss o f th eir
te am s, th eir s u pplie rs , a nd th eir u se rs .
Dris co ll
: Is th ere a m agic to fin din g th at?
Marte lli
: I d on't th in k s o ! Y ou c a n r e ad a ll th e b ooks p ublis h ed o ut th ere ,
but I ju st d on't
th in k s o ! B eca use fa kin g b ein g s o c a rin g a nd th in gs in a n
in te rv ie w is m uch e asie r
th an a ctu ally b ein g s o y e ar a fte r y e ar. S o y o u
co uld g et it w ro ng.
Ale x M arte lli: 'A nyth in g y o u d o c an p ote n tia lly b e a m plif ie d a n d c an
have a n im pact
th at's c o m ple te ly d is p ro portio nate .'
On a te ch nic a l le ve l, th e w hole s iz e o f th e c o m pany p ose s p ro ble m s a nd
ch alle nges
of co urs e . B ut it 's als o w here yo u ca n get th e gre ate st
sa tis fa ctio n fr o m w ork . A nyth in g
yo u d o c a n p ote ntia lly b e a m plif ie d a nd
ca n h ave a n im pact th at's c o m ple te ly d is p ro portio nate .
Ju st to g iv e y o u o ne e xa m ple : I d id s a y I a m a ctiv e o n S ta ck O ve rflo w .
Part o f th at
is th e jo b I d o to day, w hic h is te ch s u pport fo r G oogle C lo ud
Pla tfo rm , a nd th is in
good p art h appens th ro ugh S ta ck O ve rflo w . W ell,
Sta ck O ve rflo w it s e lf te lls m e I h ave
help ed m ore th an 5 0 m illio n p eople .
Now , I d on't k n ow h ow th ey g uess, b ut I c e rta in ly
hope it 's tr u e! I w ould
have m et m y g oal o f p ayin g b ack a ll o f th e h elp th at I w as
giv e n b y o th ers
and th en s o m e.
I k n ow I h ave n 't re ach ed a nyw here lik e th at o rd er o f m agnit u de w it h m y
books. If I'm
lu cky, m y b ooks m ay h ave h elp ed, in clu din g m ult ip le r e aders
per c o py, a m illio n p eople .
It ju st d oesn 't g et to 5 0 m illio n. T hat's w hat
bein g a t G oogle c a n m ean.

Dris co ll
: A re th ere a ny d ow nsid es to th is ?
Marte lli
: O f c o urs e , b ew are ! A m is ta ke g ets a m plif ie d ju st a s m uch ! A
lit tle o ops, a nd y o u
se nd s o m e s yste m d ow n fo r a n h our. W hoops! N ow
yo u h ave in co nve nie nce d a t th e v e ry
le ast 5 0 m illio n p eople . B ut I lik e
pla yin g o n th is la rg er-th an-lif e s ce nario .
Ale x M arte lli: 'T each in g s o m eth in g, s o h elp in g o ut s o m eb ody w ho's
havin g a p ro ble m ,
can b e t h e b est w ay t o le arn a b out t h at is su e
yo urs elf .'
Te ach in g s o m eth in g, s o h elp in g o ut s o m ebody w ho's h avin g a p ro ble m ,
ca n b e th e b est
way to le arn a bout th at is su e y o urs e lf . Y ou'r e lo okin g a t it
fr o m th e o uts id e in a
se nse , b ut th en g ettin g in , g ettin g in vo lv e d, a nd
gettin g e ngaged. Y ou c a n e xit fr o m
th e e xp erie nce w it h a m uch b ette r
unders ta ndin g o f th at s u bje ct.
Dris co ll
: H ow d oes G oogle u se P yth on?
Marte lli
: O ka y, s o it 's
a lo ng s to ry , b ut le t's s ta rt b efo re G oogle e xis te d. A
book I s tr o ngly re co m mend is
In th e P le x
b y S te ve n L evy. H e w as g iv e n
unpre ce dente d a cce ss to G oogle a nd G oogle rs to w rit e
th is b ook.
One th in g I le arn ed fr o m th at b ook is th at, w ell b efo re G oogle h ad a
nam e, L arry P age
in h is S ta nfo rd U niv e rs it y d orm it o ry w as tr y in g to w rit e
a s p id er to g et a c o py o f
th e w eb o nto lo ca l m ach in es, to p ro ce ss a nd
exp erim ent w it h . H e w ante d to u se th is
new la nguage, J a va 1 .0 b eta , b ut
th e w hole th in g k e pt c ra sh in g. S o L arry tu rn ed to
his d orm it o ry r o om mate
askin g, " H ey, c a n y o u h elp m e h ere ? I ju st c a n't g et th is p ro gra m
to r u n!"
The ro om mate to ok a lo ok a nd th en s a id , "W ell, o f c o urs e n ot! It's th at
ju nk J a va
th in g! C om e o n! L et's u se a r e al p ro gra m min g la nguage!"
Larry g ot P yth on a nd 1 00 lin es o f P yth on la te r, th e fir s t s p id er w as b orn ,
and a co py
of th e w eb w as fin din g it s w ay to th e co m pute r in th is
dorm it o ry r o om . S o in a s e nse ,
wit h out P yth on to h elp w rit e th e v e ry fir s t
sp id er, G oogle m ig ht n eve r h ave b een b orn !

Ale x M arte lli: 'W it h out P yth on t o h elp w rit e t h e v ery f ir s t s p id er,
Google m ig ht n ever
have b een b orn !'
The s p id er is s u ch a c ru cia l p ro gra m th at it m ust h ave b een re w rit te n a
millio n tim es,
and I'm p re tty s u re rig ht n ow it 's th e m ost o ptim iz e d b it o f
C++ y o u c a n im agin e.
I h ave n't lo oke d a t it fo r y e ars , b ut th e c re atio n
his to ry is s till v a lid . T he n ext
big ro le fo r P yth on a nd G oogle w as a s a
unif y in g la nguage fo r a ll o f th e d eep in fr a str u ctu re
ta sks.
Dris co ll
: W hat w as y o ur r o le a t th at tim e?
Marte lli
: T hat's w here I c a m e in a s a n u ber te ch le ader fo r in fr a str u ctu re .
In ste ad o f B ash ,
Perl, a nd o th er p ow erfu l, b ut h ard er to re ad la nguages,
eve ry th in g h ad to b e r e ca st
in to P yth on.
That w as m y fir s t jo b a nd e sse ntia lly m y te am a nd I w ent a ro und w ork in g
wit h re lia bilit y
engin eers , syste m a dm in is tr a to rs , a nd so o n, w ho h ad
writ te n v e ry u se fu l u tilit ie s
in B ash o r P erl. W e u nders to od e xa ctly w hat
was g oin g o n, r e w ro te th em , a nd p ro ductio niz e d
th em in P yth on. It w as a
hundre d tim es m ore r e adable .
The next big hit w as G oogle 's atte m pt to addre ss th e m ark e t fo r
str e am in g v id eos.
If y o u'v e e ve r h eard o f a p ro je ct c a lle d G oogle V id eo,
th at w as w here G oogle w ould
hold a ll th e v id eos, s h ow th em to y o u, a nd
le t y o u s e arc h fo r th em . It h ad, fo r th e
tim e, v e ry s u bsta ntia l in ve stm ent
behin d it : h undre ds o f b rillia nt e ngin eers a nd h ard w are
re so urc e s lik e
th ere w as n o to m orro w .
Google V id eo k e pt lo sin g th e fe atu re b attle to th is tin y s ta rt- u p a fe w
mile s aw ay.
Each tim e th is lit tle sta rt- u p unve ile d a new su cce ssfu l
fe atu re th at c u sto m ers lik e d
a lo t, o ur e ngin eers w ould s cra m ble to p ut u p
so m eth in g sim ila r a nd ta ke a m onth o r
tw o. E ach tim e w e la unch ed
so m eth in g n ew a nd in nova tiv e , th at lit tle s ta rt- u p h ad
it d one in a w eek!
Dris co ll
: D id y o u fin d o ut h ow th e
sta rt- u p w as m ovin g s o q uic kly ?
Marte lli
: E ve ntu ally , w e b ought th at lit tle s ta rt- u p a nd w e fo und o ut h ow
20 d eve lo pers ra n
cir c le s a ro und o ur h undre ds o f g re at d eve lo pers . T he
so lu tio n w as v e ry s im ple ! T hose
20 g uys w ere u sin g P yth on. W e w ere

usin g C ++. S o, th at w as Y ouT ube a nd s till is .
le x M arte lli: 'W e f o und o ut h ow 2 0 d evelo pers r a n c ir c le s a ro und o ur
hundre d s o f g re at
develo pers . T he s o lu tio n w as v ery s im ple ! T hose
20 g uys w ere u sin g P yth on.'
YouT ube, o f c o urs e , to ok m any y e ars to fu lly d eve lo p a nd e sp ecia lly to
monetiz e , b eca use
th e a m ount o f re so urc e s it w as u sin g w as h uge! It
gre w in p opula rit y g ra dually a nd
it 's a g re at s u cce ss s to ry fo r P yth on.
Oth er are as of use r-fa cin g co de va ry . S om etim es P yth on is at th e
fo re fr o nt, fo r e xa m ple
Google A pp E ngin e (o ur fir s t fo ra y in to c lo ud, a nd
still a ve ry in nova tiv e pro duct
to th is day) had P yth on as th e fir s t
su pporte d la nguage. F or y e ars P yth on w as th e
only la nguage y o u c o uld
use th ere . T hen J a va w as a dded a nd th en o th ers . B ut P yth on
re m ain s
th e m ost p opula r la nguage u se d b y c u sto m ers o n A pp E ngin e.
There is o th er s tu ff in th e G oogle C lo ud P la tfo rm w here w e h ave to , fo r
te ch nic a l
re aso ns, lim it th e la nguages th at o ur cu sto m ers ca n u se to
pro gra m . Pyth on is ty p ic a lly
alw ays num ber one or num ber tw o.
Te nso rF lo w m ay b e a noth er g re at e xa m ple th ere . I
mentio ned it e arlie r,
but th e p oin t is th at T e nso rF lo w is th e m ost p opula r G it H ub
dow nlo adin g
th ere h as b een fo r a lo ng tim e.
The e xis te nce o f A pp E ngin e h as b ia se d a lo t o f in te rn al to ols . T he o nes
th at c o uld
be d eplo ye d o n a n in te rn al- fa cin g v e rs io n o f A pp E ngin e c o uld
use P yth on b y p re fe re nce ,
and th e s e tu p is s u ff ic ie ntly g enera l th at y o u
ca n d o a lm ost e ve ry th in g th at w ay.
So in p ra ctic e , fr o m th e d ay I jo in ed
Google 1 2 a nd a h alf y e ars a go, I'v e h ad to
do a lit tle C ++, e sp ecia lly
when I w as fix in g e xis tin g s yste m s. B ut it 's b een e sse ntia lly
all P yth on a ll
th e w ay fo r m e.
Dris co ll
: Is th ere a nyth in g e ls e th at y o u'd lik e to d is cu ss?
Marte lli
: I'd lik e to d is cu ss th e ro le o f P yth on in e duca tio n. A t o ne p oin t,
mayb e o ve r 1 0
ye ars a go, th ere w as e ve n a fu nded p ro je ct th at G uid o
work e d o n to p ut P yth on in a
co re ro le fo r e duca tio n. It w as n eve r re ally
fin is h ed. S om e gre at th in gs ca m e out
of it , but th e ta kin g ove r of

educa tio n ju st d id n't h appen.
Now adays, P yth on is th e n um ber o ne p ro gra m min g la nguage u se d in
co lle ge in tr o ducto ry
co urs e s. It o ve rto ok J a va a nd o th ers q uit e a w hile
ago. B ut in hig h sch ool, th at's
not th e ca se . It se em s th at w it h th e
im porta nce o f c o m pute rs g ro w in g, ju st a b asic
le ve l o f u nders ta ndin g is
appro pria te fo r m ost h ig h s ch ool s tu dents . T hey'r e u sin g
an u nholy m ix o f
la nguages.
So w hat c o uld w e d o to m ake P yth on m ore a ttr a ctiv e fo r th is ro le ? W hat
I'm th in kin g
is th at h avin g it o nlin e a nd a b le to b e ru n th ro ugh a b ro w se r
would b e g ood. T here
are s e ve ra l s it e s th at o ff e r s u ch fe atu re s, b ut n ot in
sca la ble a nd u nif o rm w ays.
I th in k th at th e P yth on S oftw are F oundatio n (P SF) c o uld p ut a n e ff o rt
behin d it . W hy
is th at? W ell, beca use C hro m ebooks are th e le adin g
mach in es in e duca tio n to day. B y
fa r, m ore C hro m ebooks a re s e llin g to
sch ools th an a ll o th er k in ds o f d evic e s p ut to geth er.
Why? T hey'r e c h eap,
th ey'r e p ow erfu l e nough, th ey'r e s e cu re a nd th ey'r e v e ry e asy
to c o ntr o l
fr o m th e a dm in is tr a to r's v ie w poin t.
Ale x M arte lli: 'I t h in k P yth on d oes n ot n eed c h an ges, b ut
in fr a str u ctu re w ork t o m ake
a h ig hly a vaila b le s it e f o r s ch ools .'
Whate ve r y o u c a n d o o n a C hro m ebook, m eanin g e sse ntia lly o n a g ood
bro w se r o n th e
web, is m uch easie r to get in to th e cu rric u lu m th an
so m eth in g y o u h ave to in sta ll
on w hate ve r o pera tin g s yste m .
I th in k P yth on d oes n ot n eed c h anges, b ut in fr a str u ctu re w ork to m ake a
hig hly a va ila ble
sit e fo r s ch ools w it h th e k in d o f fe atu re s s ch ools n eed,
su ch a s a dm in is tr a to r c o ntr o l.
This w ould m ake a re al d if f e re nce to th e
liv e s o f m illio ns o f s ch oolc h ild re n. S o th at's
my p le a fo r a nyb ody w ho's
wonderin g w hat c o ol p ro je ct th ey c o uld s ta rt n ext w it h P yth on.
Dris co ll
: T hank y o u, A le x M arte lli.

C hap te r 8 . M arc -A ndré L em burg
M arc -A ndré L em burg
is a G erm an s o ftw are d eve lo per a nd e ntr e pre neur.
H e is th e C EO a nd fo under o f e G enix ,
whic h p ro vid es P yth on tr a in in g
a nd c o nsu lt in g s e rv ic e s. M arc -A ndré is a c o re d eve lo per
fo r P yth on a nd
t h e cre ato r o f a se t o f p op ula r P yth on e xte nsio ns. H e is a fo undin g
m em ber o f th e P yth on S oftw are F oundatio n (P SF) a nd h as s e rv e d a s a
d ir e cto r tw ic e .
Marc -A ndré is th e co -fo under of th e P yth on M eetin g
D üsse ld orf a nd th e c h air o f th e
Euro P yth on S ocie ty (E PS). H e re gula rly
g iv e s ta lk s a t P yth on c o nfe re nce s a ro und th e
world .
Dis cu ssio n t h em es: m x p ackag es, t h e P SF, v 2.7 /v 3.x .
Catc h u p w it h M arc -A ndré L em burg h ere : @ male m burg
M ik e D ris co ll
: S o w hy d id
y o u b eco m e a p ro gra m mer?
M arc -A ndré L em burg
: M y fa th er w ork e d a t IB M , s o I w as e xp ose d to
p ro gra m min g c o m pute rs q uit e e arly .
I lo ve d te ch nolo gy a nd m akin g th in gs w ork , b ut a t th e tim e (la te in th e
1 970s), c o m pute rs
were s till p re tty m uch o ut o f r e ach fo r k id s o f m y a ge. I
p la ye d a ro und w it h "p ro gra m s"
whic h w ere w rit te n d ow n o n a p ie ce o f
p aper and "ru n" by im agin in g how a re al co m pute r
would pro bably
e xe cu te th em .

I le arn ed p ro gra m min g
aged 1 1 , a fte r m y d ad p urc h ase d a S in cla ir Z X 81.
Fir s t, I le arn ed B ASIC a nd th en la te r
Z80 a sse m ble r, s in ce th e Z X 81 w as
a ra th er s lo w m ach in e. A sse m ble r w as p artic u la rly
fu n. I h ad to w rit e th e
pro gra m s b y lit e ra lly p uttin g to geth er th e o pco des b it b y
bit , b ase d o n a
Z80 m anual. I th en c o nve rte d th e o pco des to h ex a nd e nte re d th em in to
a h ex e dit o r fo r th e Z X 81 b y h and, in o rd er to r u n th e r o utin es.
Marc -A ndré L em burg : 'I le arn ed t o a p pre cia te p erfo rm an ce, a s w ell
as p ay a tte n tio n
to d eta ils .'
The e ff o rt w as w orth it , s in ce th e r o utin es r a n m uch fa ste r th an th e Z X 81
BASIC . I
le arn ed to a ppre cia te p erfo rm ance , a s w ell a s p ay a tte ntio n to
deta ils . A b ug in th e
asse m ble r c o de u su ally m eant h avin g to re sta rt th e
ZX 81, a fte r r u nnin g th e p ro gra m
and h avin g to r e lo ad e ve ry th in g a ll o ve r
again . G iv e n th e c a sse tte d riv e in te rfa ce ,
th is to ok q uit e a w hile .
About tw o y e ars la te r, m y d ad b ought th e fir s t IB M P C 1 a nd I s ta rte d to
le arn M S B ASIC ,
Turb o P asca l, a nd T urb o C . In s ch ool, I c o ntin ued to
work a lo t w it h co m pute rs and
durin g univ e rs it y I fo unded m y fir s t
co m pany.
Dris co ll
: S o h ow d id y o u
co m e a cro ss P yth on?
Lem burg
: I fir s t fo und o ut a bout P yth on w hen lo okin g th ro ugh a n O S/2
Fre ew are C D c a lle d H obbes
in 1 994. P yth on w as lis te d a s o ne o f th e
pro gra m min g la nguages a nd in clu ded in v e rs io n
1.1 .
I re ad G uid o v a n R ossu m 's tu to ria l in a n a fte rn oon a nd w as im media te ly
co nvin ce d th at
I h ad fo und w hat I h ad a lw ays b een lo okin g fo r. P yth on is
a la nguage w hic h h as a ll
of th e im porta nt d ata s tr u ctu re s, im ple m ente d in
a w ay th at is e asy to u se , w it h a
cle ar s yn ta x a nd n o n eed fo r e xp lic it
mem ory m anagem ent o r p are nth ese s to d efin e b lo cks.
At th e tim e, I w as m ostly w rit in g C c o de, s o I h ad to d eal w it h a ll o f th e
dif f ic u lt ie s
of a s yste m la nguage o n a re gula r b asis . P ro ble m s in clu ded
mem ory a llo ca tio n, p oin te r
arit h m etic , o ve rflo w s, s e gfa ult s , lo ng s e ssio ns
in d ebuggers , a nd th e s lo w e dit - c o m pile -ru n-d ebug
cycle .

Marc -A ndré L em burg : 'P yth on h ad e very th in g t h at m ad e m e h ap py.'
Pyth on h ad e ve ry th in g th at
m ade m e h appy: a n in te rp re te r fo r in te ra ctiv e
exp erim ents , g ood d ocu m enta tio n, a
fa ir ly c o m ple te s ta ndard lib ra ry a nd
a r e ally n ic e C A PI, w it h e ve ry th in g n eeded to
in te rfa ce P yth on to e xis tin g
C c o de. T his in clu ded a d eta il w hic h I fo und p artic u la rly
in te re stin g: th e
in te rp re te r w as u sin g th e d ata s tr u ctu re s it p ro vid ed fo r th e la nguage
to
als o im ple m ent it s o w n in te rn als .
Dris co ll
: C ould yo u exp la in how yo u beca m e an entr e pre neur and
fo unded y o ur o w n c o m pany?
Lem burg
: I s ta rte d w ork in g in IT a t th e a ge o f 1 7. In 1 993, w hile a t
univ e rs it y , I fo rm ed
my fir s t co m pany ca lle d IK D S and w ork e d as a
fr e ela nce r fo r lo ca l c o m panie s th at w ante d
to e nte r th e th en n ew m ark e t
of o nlin e b usin ess.
Afte r fin is h in g u niv e rs it y in 1 997, I u se d m y e xp erie nce fr o m b uild in g
se ve ra l w ebsit e
engin es, to sta rt w ork in g on a new w eb applic a tio n
se rv e r. M y a im w as to b uild a syste m
th at w ould m ake it e asy a n d
eff ic ie nt to d eve lo p o nlin e w eb syste m s. T he syste m w ould
le ve ra ge
obje ct- o rie nte d te ch nolo gy, re la tio nal d ata base s, a nd th e s im plic it y a nd
ele gance o f P yth on.
Afte r th re e ye ars of hard w ork , I had fin is h ed th e fir s t re le ase , w it h
eve ry th in g
th at w as n eeded fo r a c o m merc ia l e nte rp ris e p ro duct. I th en
sta rte d a lim it e d co m pany
to m ark e t th e pro duct early in 2000. T he
deve lo pm ent o f th e a pplic a tio n s e rv e r r e su lt e d
in m e e nte rin g th e w orld o f
open s o urc e .
Marc -A ndré L em burg : 'T he d evelo pm en t o f t h e a p plic atio n s erv er
re su lt e d in m e e n te rin g
th e w orld o f o pen s o urc e.'
Sin ce I d id n ot h ave e nough re so urc e s a va ila ble to th oro ughly te st th e
so ftw are th at
I w as w rit in g, I d ecid ed to m ake th e b asic m odule s u se d in
th e applic a tio n se rv e r
open so urc e . This is how th e popula r m x
Exte nsio ns c a m e to b e. C om merc ia lly , th e a pplic a tio n
se rv e r w as n ot a

su cce ss. I fo und th at th e m ark e t s im ply d id n't y e t u nders ta nd th e
benefit s
of s u ch a p ro duct.
I th en fo cu se d m ore on co nsu lt in g and ru nnin g pro je cts fo r oth er
co m panie s. O ne o f
th e m ore in te re stin g p ro je cts w as a fin ancia l tr a din g
syste m th at w as co m ple te ly w rit te n
in P yth on. S im ila r pro je cts are
ke epin g m e fa ir ly b usy th ese d ays, s o I u nfo rtu nate ly
don't h ave m uch
tim e to c o ntr ib ute to C Pyth on d eve lo pm ent a nym ore .
Dris co ll
: C an y o u e xp la in a lit tle m ore a bout th e m x E xte nsio ns
th at y o ur
co m pany d is tr ib ute s a nd m ain ta in s?
Lem burg
: I s ta rte d w ork in g o n th e m x E xte nsio ns
w hile d eve lo pin g th e
web a pplic a tio n s e rv e r in 1 997. A t th e tim e, I fo und th at P yth on
was
la ckin g a g ood g enera l- p urp ose d ata base m odule .
There w as a n o ld W in dow s-b ase d O DBC in te rfa ce , b ut it w asn 't r e ally u p
to th e ta sk
of p ro vid in g a v ia ble a nd p erfo rm ant in te rfa ce to d ata base s
acro ss W in dow s and U nix
pla tfo rm s. I sta rte d w rit in g m xO DBC to
addre ss th is n eed. I w ante d to c re ate a fa st a nd p orta ble in te rfa ce fo r
ODBC d riv e rs ,
whic h w ould a llo w m e to c o nnect th e a pplic a tio n s e rv e r to
all o f th e p opula r d ata base s.
While w ork in g on m xO DBC , th e la ck of a good date /tim e handlin g
module b eca m e a ppare nt.
mxD ate T im e
w as b orn to fix th is a nd b eca m e
a s ta ndard in th e P yth on w orld fo r m any y e ars , u ntil
th e P yth on s td lib
gre w it s o w n d ate tim e m odule in P yth on 2 .3 .
Marc -A ndré L em burg : 'm xD ate T im e w as b orn ...a n d b ecam e a
sta n dard in t h e P yth on w orld
fo r m an y y ears .'
mxTe xtT o ols a nd s e ve ra l o f th e o th er m x p acka ges w ere th e re su lt o f
needin g fa st p ars in g
fo r te m pla tin g in th e a pplic a tio n s e rv e r. T his w as
la te r use d by oth er people to w rit e
pars in g engin es, fo r exa m ple
Bio pyth on (p ars in g g enom e d ata ), o r d riv e p ars e rs im ple m entin g
use r-
defin ed g ra m mars .
The Ta ggin g E ngin e in m xTe xtT o ols w ork s a bit lik e a Turin g sta te

mach in e, b eca use
it p ro vid es v e ry fa st p ars in g p rim it iv e s, w hic h c a n b e
asse m ble d u sin g P yth on tu ple s.
Seve ra l u tilit y fu nctio ns h elp w it h u sin g
th e p ars in g re su lt s fo r im ple m entin g se arc h
and re pla ce . m xTe xtT o ols
was fir s t w rit te n fo r 8 -b it te xt a nd b in ary d ata . A fe w y e ars
la te r, a c lie nt
hir e d m e to e xte nd th is to U nic o de.
The le sse r kn ow n m xS ta ck a nd m xQ ueue p la ye d a ro le a s fa st d ata
str u ctu re s in th e
applic a tio n s e rv e r. T he m xTo ols p acka ge is a c o lle ctio n
of fa st b uilt - in s th at I a ls o
wro te fo r th e a pplic a tio n s e rv e r. S eve ra l o f th e
id eas in m xTo ols w ere e ve ntu ally
added to c o re P yth on in s o m e fo rm .
Dris co ll
:
So h ow d id y o u b eco m e a
Pyth on c o re d eve lo per?
Lem burg
: W hile s ta rtin g to w rit e th e m x E xte nsio ns, I h ad a lo t o f c o nta ct
wit h th e P yth on
C A PI a nd it s in te rn als . I
co ntr ib ute d b ack p atc h es to
CPyth on a nd b eca m e a c o re d eve lo per la te r in 1 997.
Pro bably m ore p eople k n ow a bout m y c o ntr ib utio ns to C Pyth on in th e
fo rm o f th e U nic o de
in te gra tio n. In 1 999, G uid o c o nta cte d F re drik L undh
and m e a nd a ske d u s to b rin g U nic o de
to P yth on. T his w as in it ia te d b y a
gra nt fr o m H P to th e P yth on C onso rtiu m (a P yth on
Softw are F oundatio n
pre dece sso r).
Marc -A ndré L em burg : 'G uid o c o nta cte d F re d rik L undh a n d m e a n d
asked u s t o b rin g U nic o de
to P yth on.'
Fre drik w ork e d on a new re gula r exp re ssio n engin e. I added nativ e
Unic o de su pport
to Pyth on. I als o desig ned and w ro te th e co dec
su bsyste m in P yth on. The in it ia l re le ase
was in 2000, w it h P yth on
1.6 /2 .0 . I h elp ed to m ain ta in th is p art o f C Pyth on 2 .0 fo r
more th an 1 0
ye ars .
Dris co ll
: W hat a re s o m e o f th e o th er c o ntr ib utio ns
th at y o u h ave m ade to
Pyth on?
Lem burg
: I c o ntr ib ute d th e s o urc e c o de e nco din g s yste m , th e p la tfo rm
module a nd p arts o f
th e lo ca le m odule . I w as a ls o re sp onsib le fo r th e
pyb ench su it e fo r m easu rin g enhance m ents
to C Pyth on and se ve ra l

patc h es and id eas to m ake P yth on ru n fa ste r, or to m ake it
more
co m fo rta ble .
Dris co ll
: W hat c h alle nges h ave y o u h ad a s
a c o re d eve lo per o f P yth on?
Lem burg
: In th e e arly y e ars , b ein g a c o re d eve lo per w as a lo t o f fu n,
sin ce th e p ro ce sse s
were a lo t le ss fo rm al th an th ey a re to day. T he o nly
re al c h alle nge w as th at d is cu ssio ns
ta rg etin g U nic o de o fte n re su lt e d in
endle ss d is cu ssio ns a nd s o m etim es fla m e w ars .
Marc -A ndré L em burg : 'D is cu ssio ns t a rg etin g U nic o de o fte n r e su lt e d
in e n dle ss d is cu ssio ns
an d s o m etim es f la m e w ars .'
I d on't kn ow w heth er th is w as b eca use U nic o de w as a t th e co re o f
work in g w it h te xt,
or s im ply d ue to th e m any s tr o ng e gos p artic ip atin g in
th e d is cu ssio ns. I to ok m ost
of th ese d is cu ssio ns w it h a g ra in o f s a lt a nd
good h um or.
Sin ce th en, w e'v e s e en s e ve ra l g enera tio ns o f c o re d eve lo pers c o m e a nd
move on. In te gra tin g
th e new deve lo pers w as ofte n not easy and
in vo lv e d lo ts of dis cu ssio ns. W e had to
tr y to exp la in how P yth on
deve lo pm ent w ork e d and m ove all of th e new energ y in th e
rig ht
dir e ctio ns.
Dris co ll
: P yth on is o ne o f
th e m ajo r la nguages u se d in A I a nd m ach in e
le arn in g. W hy d o y o u th in k th is is ?
Lem burg
: P yth on is v e ry e asy to u nders ta nd fo r s cie ntis ts w ho a re o fte n
not tr a in ed in c o m pute r
scie nce . It r e m ove s m any o f th e c o m ple xit ie s th at
yo u h ave to d eal w it h , w hen tr y in g
to d riv e th e e xte rn al lib ra rie s th at y o u
need to p erfo rm r e se arc h .
Afte r N um eric (n ow N um Py) sta rte d th e d eve lo pm ent, th e a ddit io n o f
IP yth on N ote books
(n ow J u pyte r N ote books), m atp lo tlib , a nd m any o th er
to ols to m ake th in gs e ve n m ore
in tu it iv e , P yth on h as a llo w ed s cie ntis ts to
main ly th in k a bout so lu tio ns to p ro ble m s
and n ot so m uch a bout th e
te ch nolo gy n eeded to d riv e th ese s o lu tio ns.

Marc -A ndré L em burg : 'P yth on h as a llo w ed s cie n tis ts t o m ain ly t h in k
ab out s o lu tio ns
to p ro ble m s a n d n ot s o m uch a b out t h e t e ch nolo gy
need ed t o d riv e t h ese s o lu tio ns.'
As in o th er a re as, P yth on is a n id eal in te gra tio n la nguage, w hic h b in ds
te ch nolo gie s
to geth er w it h e ase . P yth on a llo w s u se rs to fo cu s o n th e r e al
pro ble m s, ra th er th an
sp endin g tim e o n im ple m enta tio n d eta ils . A part
fr o m m akin g th in gs e asie r fo r th e u se r,
Pyth on a ls o s h in es a s a n id eal
glu e p la tfo rm fo r th e p eople w ho d eve lo p th e lo w -le ve l
in te gra tio ns w it h
exte rn al lib ra rie s. T his is m ain ly d ue to P yth on b ein g v e ry a cce ssib le
via
a n ic e a nd v e ry c o m ple te C A PI.
Dris co ll
: H ow c o uld
Pyth on b e im pro ve d fo r A I a nd m ach in e le arn in g?
Lem burg
: I th in k th at P yth on is a lr e ady o ne o f th e b est c h oic e s th at y o u
have fo r A I a nd
mach in e le arn in g. W it h a v ib ra nt c o m munit y e ngaged in
makin g th e la nguage e ve n b ette r,
Pyth on is g oin g to h ave a lo ng a nd
gre at fu tu re in th is a re a.
Mik e D ris co ll: C an y o u e xp la in h ow t h e P yth on S oftw are F oundatio n
(P SF) w as f o unded ?
Lem burg
: B efo re th e P SF w e h ad th e P yth on S oftw are A ctiv it y g ro up
(P SA), fo r w hic h y o u h ad
to p ay a s m all a m ount e ach y e ar. W e a ls o h ad
th e le sse r k n ow n P yth on C onso rtiu m , fo r
co m panie s to s u pport P yth on
deve lo pm ent, w hic h p aid b ig b ucks e ach y e ar.
Both gro ups did not
re ally pro vid e enough su pport fo r P yth on. T he
co pyrig ht in Pyth on was als o sca tte re d
acro ss se ve ra l dif f e re nt
co m panie s (s e e th e P yth on lic e nse sta ck). Tw o co m panie s th at
had
sig nif ic a ntly in ve ste d in P yth on, Z ope C orp ora tio n, and A ctiv e P yth on,
sta rte d
a p ro je ct to p ote ntia lly a ddre ss a ll o f th ese is su es w it h a n ew n on-
pro fit o rg aniz a tio n.
This beca m e th e P SF and it w as fo unded at IP C 9, th e co m merc ia l
In te rn atio nal P yth on
Confe re nce 9 . W e h ad 1 6 P yth on c o re d eve lo pers a t
th e tim e and th e tw o co m panie s as
fo undin g m em bers . The co re
deve lo pers , in clu din g G uid o, lic e nse d th eir c o ntr ib utio ns
to th e P SF b y
sig nin g c o ntr ib uto r a gre em ents a nd a ll s u bse quent r e le ase s w ere d one
in

th e n am e o f th e P SF.
In it ia lly , th e P SF did noth in g m ore th an w ork as a le gal body fo r
main ta in in g th e
co pyrig ht in P yth on dis tr ib utio n. Late r, th e P SF als o
re ce iv e d th e tr a dem ark r ig hts
to th e w ord m ark P yth on fr o m C NRI.
In 2 003, th e P SF th en u nderw ro te th e fir s t P yC on U S co nfe re nce in
Wash in gto n. T his
new d eve lo pm ent in tr o duce d a re ve nue s tr e am fo r th e
PSF, whic h opened up new possib ilit ie s
fo r help in g th e Pyth on
co m munit y .
Marc -A ndré L em burg : 'T his n ew d evelo pm en t in tr o duced a r e ven ue
str e am f o r t h e P SF,
whic h o pen ed u p n ew p ossib ilit ie s f o r h elp in g
th e P yth on c o m munit y .'
As P yC on U S g re w a nd c o m merc ia l s p onso rs s ta rte d s u pportin g it m ore ,
th e re ve nue a ls o
gre w . T his re su lt e d in th e P SF tu rn in g in to a m ore
matu re o rg aniz a tio n o ve r th e y e ars .
I w as o n th e P SF b oard fo r s e ve ra l
ye ars to h elp w it h th ese d eve lo pm ents .
Dris co ll
: I k n ow th at y o u h elp ed to o rg aniz e th e fir s t E uro P yth on. C ould
yo u te ll m e a bout
th at?
Lem burg
: In 2 001, a g ro up o f
E uro pean P yth on a nd Z ope u se rs a nd
co m panie s s ta rte d a lo ng d is cu ssio n a bout th e d esir e to h ave a P yth on
co nfe re nce in
Euro pe.
The P yth on w ork sh ops a nd th e IP C co nfe re nce s w ere a ll in th e U S.
There w asn 't m uch
goin g o n fo r P yth on in E uro pe a t th e tim e. I w as o ne
of th e p artic ip ants in th e d is cu ssio ns
and th ey d id n ot s e em to w ant to
end. C lo se r to th e e ve nt, I th en jo in ed th e e xe cu tiv e
co m mit te e to a ctu ally
make th e E uro P yth on c o nfe re nce h appen. T hat's h ow E uro P yth on
2002
ca m e to b e.
Marc -A ndré L em burg : 'T here w asn 't m uch g oin g o n f o r P yth on in
Euro pe a t t h e t im e.'

The w hole e ve nt w as ru n b y v o lu nte ers , u nlik e th e c o m merc ia l P yth on
co nfe re nce s in
th e U S a t th e tim e. W e w ere o n a v e ry s m all b udget. A s
su ch , Euro P yth on als o pre date s
PyC on US, whic h was th e fir s t
co nfe re nce th at w as r u n b y v o lu nte ers in th e U S.
Euro P yth on 2 002 w as h eld in C harle ro i. It w as a lo t o f fu n to b e a ble to
ru n a fir s t
majo r E uro pean P yth on co nfe re nce . E uro P yth on w as a ls o
quit e s u cce ssfu l, w it h e ve n
Guid o a tte ndin g. N ow adays, th ere a re lo ts o f
natio nal Pyth on eve nts happenin g each
ye ar, so w hile Euro P yth on
doesn 't w ant to c o m pete w it h o th er n atio nal P yth on e ve nts ,
it 's d efin it e ly
opera tin g in th at s p ace .
Dris co ll
: H ow h as E uro P yth on c h anged o ve r th e y e ars ?
Lem burg
: S in ce th e early days, E uro P yth on has gro w n a lo t and it
passe d th e 1 000 a tte ndee
mark in 2 014. T he c o nfe re nce is s till ru n b y
vo lu nte ers , b ut it 's n o lo nger a n o pera tio n
whic h c a n b e r u n o n th e s id e.
The E uro P yth on S ocie ty , w hic h o rg aniz e s E uro P yth on, h as a lo t o f w ork
to d o e ach y e ar
to p ut o n th e c o nfe re nce . I'm th e c h air o f th e o rg aniz a tio n
at th e m om ent a nd h ave
been o n th e b oard fo r s e ve ra l y e ars . E ach y e ar,
we'r e gro w in g th e eve nt in to a m ore
pro fe ssio nal se tu p. S till, it 's a
ch alle nge s ta yin g o n to p o f e ve ry th in g th at n eeds
to b e d one to p ut o n a
co nfe re nce . T he b oard m em bers ty p ic a lly h ave to w ork b etw een
200 a nd
400 h ours e ach to m ake a n e ve nt h appen.
Dris co ll
: W hat a re y o u m ost e xcit e d a bout in P yth on to day?
Lem burg
: I'm m ost e xcit e d a bout th e n ativ e a syn c I/O s u pport. W it h th e
addit io n o f n ew k e yw ord s,
th is h as fin ally b eco m e u sa ble in P yth on a nd
will g o a lo ng w ay in h elp in g to u se
th e fu ll C PU p ow er th at's a va ila ble o n
to day's m ach in es.
Marc -A ndré L em burg : 'I 'm m ost e xcit e d a b out t h e n ativ e a syn c I/O
su pport.'
As a n a sid e, I fin d th e P yth on ty p e a nnota tio ns to b e th e le ast e xcit in g
deve lo pm ent
in to day's P yth on. T hey ta ke a w ay a lo t o f th e e le gance o f

Pyth on pro gra m s. E ve n th ough
ty p e annota tio ns are optio nal, m any
co m panie s w ill e nfo rc e th eir u se v ia c o rp ora te
polic y. T his w ill e ve ntu ally
re su lt in m ore a nd m ore P yth on b ein g w rit te n u sin g th ese
annota tio ns
and w ill m ake P yth on lo ok a lo t lik e a ny o th er m odern s ta tic a lly ty p ed
scrip tin g la nguage.
Dris co ll
: W hat d o yo u th in k a bout P yth on 2 .7 ? S hould e ve ry o ne b e
movin g o ve r to th e la te st
ve rs io n?
Lem burg
: Y es, th ey s h ould , b ut
yo u h ave to c o nsid er th e a m ount o f w ork
whic h h as to g o in to a p ort fr o m P yth on 2 .7
to 3 .x . M any c o m panie s h ave
huge co de b ase s w rit te n fo r P yth on 2 .x , in clu din g m y o w n
co m pany
eG enix . C om merc ia lly , it d oesn 't a lw ays m ake s e nse to p ort to P yth on
3.x ,
so th e d iv id e b etw een th e tw o w orld s w ill co ntin ue to e xis t w ell
beyo nd 2 020.
Marc -A ndré L em burg : 'C om merc ia lly , it d oesn 't a lw ays m ake s en se
to p ort t o P yth on
3.x , s o t h e d iv id e b etw een t h e t w o w orld s w ill
co ntin ue t o e xis t w ell b eyo nd 2 020.'
Pyth on 2 .7 d oes h ave it s a dva nta ges b eca use it b eca m e th e L T S v e rs io n
of Pyth on. Corp ora te
use rs genera lly lik e th ese lo ng-te rm su pport
ve rs io ns, s in ce th ey r e duce p ortin g e ff o rts
fr o m o ne v e rs io n to th e n ext.
I b elie ve th at P yth on w ill h ave to c o m e u p w it h a n L T S 3 .x v e rs io n a s
well, to b e
able to s u sta in s u cce ss in th e c o rp ora te w orld . O nce w e s e ttle
on s u ch a v e rs io n,
th is w ill a ls o m ake a m ore v ia ble c a se fo r a P yth on 2 .7
port, s in ce th e in ve stm ent
will th en b e s e cu re d fo r a g ood n um ber o f
ye ars .
Dris co ll
: W hat c h anges w ould
y o u lik e to s e e in fu tu re P yth on r e le ase s?
Lem burg
: P yth on w ill n eed to m ake it e asie r to u se th e fu ll n um ber o f
co re s a nd C PU s th at
yo u have in to day's m ach in es. A syn c I/O has
help ed b y m akin g b ette r u se o f a s in gle
co re , b ut it 's n ot th e a nsw er to
mult i- c o re d eplo ym ents .
Rem ovin g th e G lo bal
In te rp re te r L ock (G IL ) a nd re pla cin g it w it h m ore

fin e-g ra in ed lo ckin g m ech anis m s
would b e o ne a ppro ach , b ut it 's g oin g to
be a lo ng a nd ro cky p ath to s u ch a w orld .
We s h ould b e c a re fu l n ot to
undere stim ate th e c o m ple xit ie s a nd p ossib le b re aka ge to
th e m any C
exte nsio ns. A lie natin g th ese w ould s e t b ack P yth on a lo t, s in ce th ey a re
esse ntia l d riv e rs o f P yth on's su cce ss. A s a re su lt , w e w ould h ave to
pro vid e a s m ooth
upgra de p ath fo r th e e xis tin g e xte nsio ns, p erh aps b y
ke epin g th e G IL in p la ce w hile
th ey a re in c o ntr o l.
In m y o pin io n, w e sh ould a ls o in ve stig ate o th er a ppro ach es, su ch a s
makin g in te r-p ro ce ss
co m munic a tio n m ore eff ic ie nt and use r fr ie ndly ,
perh aps e ve n b y a ddin g n ew ke yw ord s
to a uto m atic a lly ru n co de in
para lle l.
Dris co ll
: T hank y o u, M arc -A ndré L em burg .

C hap te r 9 . B arry W ars aw
B arry W ars a w
is a n A m eric a n s o ftw are e ngin eer a nd a m em ber o f th e
P yth on F oundatio n te am a t L in ke dIn .
Barry w ork e d fo r C anonic a l fo r 1 0
y e ars , b eco m in g a n U buntu a nd D ebia n d eve lo per w it h
re sp onsib ilit y fo r
t h e P yth on e co syste m o n th ose o pera tin g s yste m s. H e w as th e p ro je ct
l e ader o f G NU M ailm an, a p opula r o pen so urc e m ailin g lis t m anager
w rit te n in P yth on.
Barry 's fo rm er r o le s in clu de le ad m ain ta in er fo r J yth on,
P yth on r e le ase m anager a nd
mem ber o f P yth onLabs. T o day h e is a c o re
d eve lo per, th e auth or of se ve ra l su cce ssfu l
Pyth on Enhance m ent
P ro posa ls , a nd th e m ain ta in er o f n um ero us P yth on lib ra rie s.
Dis cu ssio n t h em es: P yth onLab s, P yth on's f u tu re , v 2.7 /v 3.x .
Catc h u p w it h B arry W ars aw h ere : @ pum pic h an k
M ik e D ris co ll
: H ow d id y o u
end u p b eco m in g a p ro gra m mer?
B arry W ars aw
: I sta rte d pro gra m min g when I was pre tty yo ung.
C om pute rs th en w ere a ctu ally T e le ty p e
mach in es, th at w ere c o nnecte d to
m ain fr a m es in th e s ch ool a nd th e m ain s ch ool d is tr ic t.
So I g ot o n th e
T e le ty p es.
I le arn ed B ASIC , w hic h w as r e ally fu n. I r e m em ber in th e s u m mer o f th at
y e ar, s o m e
of th e k id s in a noth er s ch ool u se d th ose s a m e T e le ty p es to

bre ak in to th e m ain fr a m es
in th e B oard o f E duca tio n. S o th e n ext y e ar
th ey p ulle d th em a ll o ut o f th e s ch ools
and g ave u s 6 502-b ase d P C s. T he
te ach ers d id n't k n ow h ow to u se th em a t a ll, s o I
ta ught th e te ach ers .
The g uid ance c o unse lo rs
to ok n otic e o f w hat I w as d oin g. T hey h ooke d
me u p w it h s u m mer in te rn sh ip s a t w hat
was th en ca lle d th e N atio nal
Bure au o f S ta ndard s (N BS)
, a fe dera l re se arc h fa cilit y in G ait h ers b urg ,
Mary la nd. T he N BS is w here I le arn ed
to lo ve sh arin g p ro gra m s a nd
co lla bora tin g w it h o th er p eople .
Dris co ll
: S o d id y o u w ork w it h
N BS a ll th ro ugh h ig h s ch ool?
Wars aw
: Y es, I in te rn ed w it h N BS th ro ugh hig h sch ool and th ro ugh
co lle ge. T hen I g ot a fu ll- tim e
jo b a t w hat is n ow ca lle d th e N atio nal
In stit u te o f S ta ndard s a nd T e ch nolo gy (N IS T)
and I w ork e d th ere u ntil
1990.
My in te rn sh ip s a nd th en fu ll- tim e jo b a t N IS T w ere e ye -o penin g, b eca use
I d id n't a ctu ally
kn ow w hat th e r e al in dustr y w as lik e , o r w hat it w as lik e to
be a p ro fe ssio nal p ro gra m mer.
Barry W ars aw : 'I d id n't a ctu ally k n ow w hat t h e r e al in dustr y w as
lik e, o r w hat it
was lik e t o b e a p ro fe ssio nal p ro gra m mer.'
I w ork e d w it h th e ro botic s te am a t th e tim e a nd a lt h ough I w asn 't d oin g
much ro botic s,
I d id fin d m yse lf w ork in g o n th e g ra phic a l u se r in te rfa ce s
fo r in dustr ia l ro bots fo r
fa cto ry a uto m atio n. T hat w ork w as ju st a m azin g.
Fro m th ere I g ot in to s yste m a dm in is tr a tio n.
A fe w y e ars in to th at w e g ot
a lo t o f S un-3 s, s o w e le arn ed S unO S, U nix , C p ro gra m min g,
Em acs,
and a ll k in ds o f th in gs lik e th at.
I w as a c o m pute r s cie nce u nderg ra duate a nd it w as fin e, b ut I re ally
le arn ed th e tr a de
by d oin g re al p ro gra m min g a t N IS T. I'v e n otic e d th at
co lle ge c la sse s d on't e xa ctly
pre pare y o u fo r w hat y o u a ctu ally e nd u p
doin g.
Barry W ars aw : 'I r e ally le arn ed t h e t r a d e b y d oin g r e al p ro gra m min g

at N IS T.'
For e xa m ple , I w as ta lk in g to s o m e c u rre nt in te rn s a nd th ey s a id th at in
co lle ge,
at le ast a s u nderg ra duate s, y o u d on't e ve n le arn v e rs io n c o ntr o l
syste m s, s u ch a s
usin g G it . T hat is ju st a m azin g to m e. I c a n't b elie ve
how div o rc e d fr o m th e re alit y
of w ork in g pro gra m mers th e co lle ge
envir o nm ent is . It is v e ry s h ockin g w hen y o u g et
out o f c o lle ge a nd it 's
co m ple te ly d if f e re nt to w hat y o u w ere ta ught.
Dris co ll
: D o y o u th in k th at P yth on o ff e rs a p ath w ay to r e al p ro gra m min g,
as y o u c a ll it , fo r
new p ro gra m mers ?
Wars aw
: Y es, w hen I'm
ta lk in g to k id s to day th at u se P yth on, th ese k id s
have o fte n s o m ehow h ooke d u p w it h
a p ro je ct o n G it H ub. S om etim es
th ey'v e e ve n c o m e to a P yth on c o nfe re nce a nd s ta ye d
fo r th e s p rin ts .
Kid s le arn so m uch m ore about m odern so ftw are engin eerin g best
pra ctic e s th at w ay.
You ca n re ally se e it . They co m e in and th ey
unders ta nd h ow to d o p ull re quests a nd
how to file g ood b ugs. I te ll a ll
th e y o ung k id s th at I ta lk w it h to fin d a G it H ub,
Git L ab, o r e ve n B it b ucke t
pro je ct th at in te re sts th em a nd s ta rt g ettin g in vo lv e d.
Pyth on, o f c o urs e , is a n a m azin g c o m munit y fo r th at. It's s o w elc o m in g to
a d iv e rs e
gro up o f p eople . In th e P yth on c o m munit y w e'r e fr ie ndly , w e
acce pt a nyb ody, a nd w e
guid e a nd m ento r th em . S o I a ls o te ll s tu dents
who re ally w ant to le arn how to do
it rig ht to co m e to th e P yth on
co m munit y a nd g et e ngaged, b eca use th ey a re g oin g to
le arn s o m uch
by d oin g th at.
Dris co ll
: H ow d id y o u e nd u p
gettin g in to P yth on y o urs e lf ?
Wars aw
: In 1 994, I m et R oger M asse . H is g ir lf r ie nd (a nd c u rre nt w if e )
and m y w if e w ere v e ry
fr ie ndly , s o w e'd
a ll g et to geth er fo r d in ner. R og
and I r e ally c o nnecte d o n a g eek le ve l.
Rog h ad ju st s ta rte d a jo b a t C NRI, w hic h is th e C orp ora tio n fo r N atio nal
Rese arc h
In it ia tiv e s in V ir g in ia (C NRI
w as s ta rte d b y B ob K ahn
a nd V in t
Cerf, w ho a re tw o o f th e
fa th ers o f T C P/IP .) S o in th e la te s u m mer o f
1994, I s ta rte d w ork in g fo r C NRI to o.

I w as w ork in g o n a p ro je ct c a lle d k n ow bots . T hese w ere
lit tle s o ftw are
agents th at w ould b undle th em se lv e s u p a nd m ove to a d if f e re nt h ost.
The k n ow bots w ould d o s o m e w ork o ve r a t a noth er h ost a nd th en m ove
aro und th e in te rn et
to fin d in fo rm atio n fo r y o u. R og a nd I s ta rte d w ork in g
on th at p ro je ct in O bje ctiv e -C
on N eX T m ach in es.
A lit tle la te r, s o m e fr ie nds w ho w ere s till a t N IS T to ld m e a bout a D utc h
guy w ho
was c o m in g to g iv e a lit tle w ork sh op o n th is la nguage th at h e
had in ve nte d. T hey a ske d
wheth er I'd b e in te re ste d, s o w e d id a lit tle b it
of r e se arc h . O f c o urs e , it w as G uid o
va n R ossu m , a nd th e la nguage w as
Pyth on, s o w e s a id , " S ure , w e'd lo ve to c o m e."
Barry W ars aw : 'A D utc h g uy...w as c o m in g t o g iv e a lit tle w ork sh op
on t h is la n guag e
th at h e h ad in ven te d . T hey a sked w heth er I'd b e
in te re ste d , s o w e d id a lit tle b it
of r e searc h . O f c o urs e, it w as G uid o
van R ossu m , a n d t h e la n guag e w as P yth on.'
We w ante d to ta lk to G uid o a bout s o m e o f h is id eas, b eca use w e th ought
th at P yth on
co uld b e re ally c o ol fo r th is O bje ctiv e -C p ro je ct. W e th ought
we c o uld s crip t O bje ctiv e -C
in P yth on.
The w ork sh op w as in N ove m ber o f 1 994. T here w ere o nly 2 0 o f u s a nd
we ju st fe ll in
lo ve w it h P yth on a nd G uid o. H e w as ju st s o o pen a nd c o ol
and th e w ork sh op w as r e ally
fa nta stic . I th in k b oth G uid o a nd I w ere fa ns
of E m acs, s o w e ta lk e d a bout h ow d ocstr in gs
in P yth on c o uld w ork a lit tle
bit s yn ta ctic a lly , o r a t le ast s yn ta ctic a lly lik e d ocstr in gs
in E m acs L is p .
Afte r th e w ork sh op, w e w ent b ack to C NRI a nd w ere ju st g ush in g a bout
how w e th ought
Pyth on w as goin g to w ork re ally w ell. O ne of our
co lle agues s a id , " H ey, w hy d on't
we tr y to h ir e G uid o?" W e d id n't k n ow if
he w ante d to co m e to th e U nit e d S ta te s, or
would be in te re ste d in
work in g o n th is O bje ctiv e -C P yth on th in g, o r th e k n ow bot p ro je ct.
But h e
was, s o in A pril o f 1 995 G uid o s ta rte d a t C NRI.
We m ove d a lo t o f th e in fr a str u ctu re fr o m th e N eth erla nds to V ir g in ia . I
th in k at
th e tim e it w as a C VS re posit o ry . S o w e pulle d th e C VS
re posit o ry o ve r, d id a lo t
of th e s yste m a dm in is tr a tio n s tu ff fo r P yth on,
and o f c o urs e g ot in to d eve lo pin g P yth on
as w ell.

Barry W ars aw : 'P yth on 1 .2 w as t h e f ir s t v ers io n t h at w e r e le ased o ut
of C NRI. S o it
was in s o m e w ays v ery m uch t o day's P yth on.'
I k n ew C p re tty w ell a t th e tim e, s o
we d id a lo t o f w ork o n th e C in te rn als
of P yth on a nd th en a ls o th e P yth on s ta ndard
lib ra ry . I th in k P yth on 1 .2
was th e fir s t v e rs io n th at w e re le ase d o ut o f C NRI. S o
it w as in s o m e
ways v e ry m uch to day's P yth on. E ve n P yth on 3 h as th e s a m e fe el to it
th at P yth on d id w ay b ack th en. A lt h ough th ere a re s o m any a m azin g n ew
fe atu re s, th at
I d on't k n ow w heth er y o u w ould r e co gniz e it .
I s e em to re m em ber th at a lt h ough P yth on h ad c la sse s, it d id n't e ve n
have ke yw ord a rg um ents .
We w ere d oin g a lo t o f th in gs w it h Tc l/ T k
gra phic a lly . T he sig natu re s of fu nctio ns
got rid ic u lo us, beca use eve n
th ough m ost o f th e a rg um ents w ere N one, y o u h ad to p ass
th em a ll in .
So th at w as th e m otiv a tio n fo r d oin g k e yw ord a rg um ents . A nyw ay, C NRI
was g re at a nd w ork in g w it h G uid o o n P yth on w as fa nta stic . W e d id th at
until G uid o
move d o n.
Dris co ll
: S te ve H old en s a id th at y o u w ere p art o f P yth onLabs
. W ere y o u
one o f th e fo unders ?
Wars aw
: Y es, in 2 000 a b unch o f
us le ft C NRI to s e ek o ur fo rtu nes w it h
Pyth on. It w as th e fiv e o f u s: T im P ete rs ,
Je re m y H ilt o n, F re d D ra ke ,
myse lf , a nd G uid o. R oger sta ye d a t C NRI. T hat g ro up w as
what w e
ca lle d P yth onLabs, b ut it w as m ore o f a n in sid e jo ke . I m ean, it w asn 't
re ally
an o ff ic ia l th in g.
Barry W ars aw : 'I n 2 000 a b unch o f u s le ft C NRI t o s eek o ur f o rtu nes
wit h P yth on.'
We jo in ed B eO pen, b ut th at la ste d fo r a fe w m onth s a nd th en w ent a w ay.
Then w e a ll
move d o ve r to Z ope C orp ora tio n. W e ju st fe lt lik e w e
had a
lit tle c lu b m ade u p o f th e fiv e o f u s w ho h ad c o m e fr o m C NRI a nd T im
Pete rs ,
of c o urs e . S o th at's re ally w hat P yth onLabs w as. I e ve n m ade a
jo ke a t o ne tim e o n
th e m ailin g lis t a nd a ske d T im w heth er P yth onLabs
still e xis ts . If yo u g o to p yth onla b.c o m ,
yo u'l l fin d th e ve ry h um oro us
re sp onse fr o m T im to m y q uestio n.

Dris co ll
: D id y o u g uys h ave
s p ecif ic r o le s in P yth onLabs?
Wars aw
: N ot re ally , a lt h ough G uid o re ally le d th e w ork th at w e d id o n
Pyth on a nd th e w ork
th at w e d id w it h P yth on.
I c a n't r e m em ber m any o f th e d eta ils a bout w hat w e d id in th e b egin nin g,
eve n w it h
Zope C orp ora tio n. O f c o urs e , w e a ll h ad ta sks to d o w it h in
Zope C orp ora tio n, b ut th en
we w ould g et to geth er a nd w ork o n P yth on
it s e lf .
Barry W ars aw : 'W e w ork ed o n w hat w e f o und in te re stin g, w hic h w as
in te rn als , n ew f e atu re s,
bug f ix es o r in fr a str u ctu re .'
We w ork e d on w hat w e fo und in te re stin g, w hic h w as in te rn als , new
fe atu re s, b ug fix e s,
or in fr a str u ctu re . A ll o f th at s tu ff re ally n eeded to b e
done b ack th en, b eca use th e
Pyth on c o m munit y w as s o m uch s m alle r
th an it is n ow .
Dris co ll
: S o w ere th ere a ny
goals a t th at tim e fo r th e P yth on la nguage
th at y o u g uys w ere s h ootin g fo r?
Wars aw
: Y ou k n ow , it 's h ard fo r m e to re m em ber th e e xa ct tim elin e, b ut
I'm su re so m eone
co uld d o th e a rc h aeolo gy a nd fig ure o ut w hat th e
fe atu re s w ere . I d o r e m em ber th e
big p ush es.
One o f th e e arlie st th in gs th at I d id a t C NRI w as w ork w it h R oger o n w hat
was c a lle d
th e g ra nd re nam in g. T he P yth on C s o urc e c o de b ack a t th at
tim e d id n't h ave th e n ic e
cle an n am esp ace s th at th e C A PI h as n ow .
They w ere a ll ju st n am ed in a g lo bal n am esp ace .
The p ro ble m w it h th at w as th at p eople w ere tr y in g to e m bed P yth on, b ut
it w asn 't g oin g
to w ork b eca use th ose n am es w ere c o llid in g w it h th eir
ow n s ym bols . S o w e d id th e g ra nd
re nam in g, w here w e w ent th ro ugh th e
entir e in te rn al C A PI a nd c le aned it u p, s o th at
yo u c o uld e m bed P yth on
in o th er C a pplic a tio ns. S o I re m em ber th at w as o ne o f th e
ve ry fir s t
th in gs th at I d id .
There w as a ls o a lo t o f w ork o n n ew -s ty le c la sse s a t th e tim e, w hic h o f

co urs e in
Pyth on 3 is th e only kin d of cla ss. There w ere a lo t of
dis cu ssio ns a bout h ow th e
ty p e s yste m w ould w ork in th e n ew -s ty le c la ss
in fr a str u ctu re .
The o th er th in g th at I re m em ber fr o m th e o rig in al w ork sh op w as th at
th ere w as th is
guy nam ed D on B eaudry . H e w as
doin g so m e cra zy
meta cla ss h acks. O f co urs e , Jim F ult o n
w as ve ry in te re ste d in d oin g
meta cla ss s tu ff a s w ell. J im w as th e C TO o f Z ope C orp ora tio n.
Barry W ars aw : 'B y P yth on 2 .2 , w e r e ally w an te d t o d o m eta cla sses
rig ht a n d f ix s o m e
of t h e p ro ble m s w it h t h e s em an tic s o f c la ssic
cla sses.'
I re m em ber n ot re ally u nders ta ndin g m uch a bout m eta cla sse s a t th e
orig in al P yth on
work sh op. It w ent o ve r m y h e ad a t th e tim e. H ow eve r, b y
Pyth on 2 .2 , w e r e ally w ante d
to d o m eta cla sse s r ig ht a nd fix s o m e o f th e
pro ble m s w it h th e s e m antic s o f c la ssic
cla sse s.
I r e m em ber a lo t o f d is cu ssio ns a bout h ow th e n ew -s ty le c la ss s tu ff c o uld
work s o
th at y o u c o uld in herit fr o m a ty p e a nd d efin e n ew ty p es, a s w ell
as n ew in sta nce s.
There w ere ju st s o m any fe atu re s, b ut w e a ll p it c h ed in
on th e th in gs th at w ere in te re stin g
to u s.
Dris co ll
: I s e em to re ca ll th at y o u w ork e d o n th e
orig in al e m ail lib ra ry in
Pyth on. D o y o u r e m em ber h ow th at c a m e a bout?
Wars aw
: Y eah, s o o ne o f th e th in gs th at w e d id e arly o n w as to m ove th e
Pyth on m ailin g lis t
to C NRI. It w as s till b ein g ru n a t C W I, w hic h w as th e
Dutc h in stit u te w here G uid o
work e d b efo re h e c a m e to th e U S.
The P yth on m ailin g lis t w as r
unnin g o n M ajo rd om o, w hic h w as th e m ost
popula r m ailin g lis t s o ftw are a t th e tim e,
and w as w rit te n a ll in P erl. W hen
we m ove d it o ve r, th ere w ere a lo t o f th in gs th at
we w ante d to im pro ve .
By th e w ay, K en M anheim er a ctu ally c ro ps u p h ere b eca use h e
was v e ry
in str u m enta l in th e e arly d ays o f M ailm an.
So w e p ulle d th e M ajo rd om o in sta lla tio n o ve r to C NRI, b ut it w as re ally
in co nve nie nt
makin g th e c h anges to it th at w e w ante d to m ake , b eca use

we d id n't e njo y d eve lo pin g
in P erl. W e'r e P yth onis ta s, r ig ht?
Barry W ars aw : 'W e d id n't e n jo y d evelo pin g in P erl. W e'r e
Pyth onis ta s, r ig ht? '
We h ad a fr ie nd b y th e n am e o f
Jo hn V ie ga, w ho w as g oin g to th e
Univ e rs it y of V ir g in ia . Jo hn w as fr ie nds w it h th e
guys in th e D ave
Matth ew s B and
b efo re th ey w ere b ig . S o J o hn w ante d to w rit e a lit tle
mailin g lis t m anager in P yth on,
th at h e c o uld u se to c o nnect th e fa ns w it h
th e band and se nd out announce m ents . H e
wro te th e m ailin g lis t
manager, a nd w e c a ught w in d o f it .
We th ought th at m ayb e w e c o uld w ork o n th is th in g fo r P yth on m ailin g
lis ts , b eca use
it w ould b e b ette r to h ave a P yth on-b ase d m ailin g lis t
manager. S o w e g ot a c o py o f
th e m ailin g lis t m anager, b ut J o hn lo st th e
dis c and th e orig in al co py of what eve ntu ally
beca m e M ailm an.
Fortu nate ly , K en h ad a c o py th at h e re su rre cte d a nd w e w ere a ble to
sta rt w ork in g o n it to s u pport th e m ailin g lis t fo r th e P yth on c o m munit y .
We d ecid ed th at w e w ould c a ll th e m ailin g lis t m anager M ailm an. W e
th en p ut it in to
th e G NU P ro je ct a nd p ut th e G PL o n it . I p ers o nally g ot
re ally in vo lv e d w it h M ailm an.
It w as in te re stin g a nd I re ally lo ve d th e
asp ect o f a llo w in g p eople to c o m munic a te .
Barry W ars aw : 'I r e ally lo ved t h e a sp ect o f a llo w in g p eo ple t o
co m munic ate .'
The o th er re ally c o ol th in g a bout th e e arly M ailm an s o ftw are w as th at it
had a w eb
in te rfa ce , w hic h w as s o m eth in g th at M ajo rd om o d id n't h ave a t
th e tim e. T hat w as o ne
of th e d efin in g fa cto rs , in m y o pin io n, o f M ailm an.
One of th e th in gs th at I re aliz e d w as th at th ere w as no good R FC
co m plia nt e m ail- p ars in g
so ftw are . T here re ally w asn 't . T here w as th e
rfc 8 22 m odule in th e s ta ndard lib ra ry ,
but it w asn 't v e ry a dva nce d a nd
new e m ail s ta ndard s w ere c o m in g o ut fo r th e fo rm at
of e m ail m essa ges.

It b eca m e a ppare nt th at rfc 8 22
wasn 't g oin g to c u t it . S o I w ork e d o n a n
off s h oot
ca lle d m im elib , th at added su pport fo r M IM E co nstr u cts :
co m posin g m essa ges, h avin g
dif f e re nt M IM E ty p es a nd im ages. W e h ad
defin ed a m odel th at d escrib ed a n e m ail m essa ge,
esp ecia lly o n M IM E
messa ges.
We w ante d it to b e p ossib le to p ro gra m matic a lly b uild u p a tr e e o f e m ail
messa ges.
We h ad a p ars e r s o th at y o u c o uld fe ed it a b unch o f P yth on 2
byte str in gs. Y ou had
th is pars e r and it w ould giv e yo u a tr e e th at
re pre se nte d th e e m ail m essa ge. T hen
yo u co uld m anip ula te th at a nd
pass th at tr e e to a g enera to r. T he g enera to r w ould fla tte n
th e tr e e b ack
in to th e b yte re pre se nta tio n o f a n e m ail m essa ge, a lo ng w it h th e M IM E
boundarie s a nd th in gs lik e th at.
We tr ie d to b e R FC c o m plia nt a s b est a s w e c o uld . I th in k w e w ere p re tty
su cce ssfu l,
but th ey'r e ve ry co m plic a te d sta ndard s. I th in k e ve n n ow
we'r e le arn in g th e d efic ie ncie s
and th e b ugs in it . In a ny c a se , m im elib
was a th in g a nd I re le ase d m im elib a s a s e para te
th ir d -p arty p acka ge.
Then I s ta rte d u sin g m im elib in M ailm an. It w as a r e al b enefit
to h ave th is
th ir d -p arty p acka ge th at w e c o uld d eve lo p s e para te ly fr o m M ailm an
a nd
ju st p ull in a s a d ependency.
I d on't re m em ber e xa ctly w hen it h appened, b ut th ere w as a P yth on
re le ase w hen w e
fe lt th at m im elib w as p re tty s ta ble a nd th e A PI w as
pre tty g ood. S o w e p ulle d m im elib
in to th e s ta ndard lib ra ry a nd re nam ed
it a s th e e m ail p acka ge, w hic h is a b ette r n am e
fo r it a nyw ay, b eca use
th ere 's a lo t m ore to it th an ju st M IM E.
Barry W ars aw : 'W e p ulle d m im elib in to t h e s ta n dard lib ra ry a n d
re n am ed it a s t h e e m ail
packag e.'
So th at's th e h is to ry o f th e e m ail p acka ge. It c a m e fr o m m im elib , w hic h
ca m e fr o m
th e w ork in M ailm an, o n to p o f
th e rfc 8 22 m odule in th e o ld
Pyth on s ta ndard lib ra ry . I w as a ctu ally jo kin g w it h th e
guys th at w e s h ould
have c a lle d th e p anel s e ssio n a t P yC on G ra ndpa's P yth on T im e!
We'v e
all b een a ro und P yth on fo r s o lo ng. W e s h ould s a y, "K id s! C om e o n u p
and s it
aro und th e fir e . G ra ndpa w ill te ll y o u s to rie s a bout P yth on in th e
old d ays."

Dris co ll
: S o w e ta lk e d a bout M ailm an. H ave y o u le arn ed a ny le sso ns
th at y o u w ould lik e to
sh are fr o m b ein g th e
le ad fo r th at p ro je ct?
Wars aw
: I'm n ot s u re th at I'm re ally
th e b est p ro je ct le ader! I h ave s o
many in te re sts a nd fin d it d if f ic u lt to s p end th e
rig ht a m ount o f tim e w it h a
pro je ct.
I a m fo rtu nate to h ave c o re d eve lo pers
in th e M ailm an p ro je ct w ho a re
fa nta stic deve lo pers , re ally am azin g people and su per
fr ie ndly . The
hig hlig ht o f m y P yC on is to g et to geth er w it h th e c o re d eve lo pers to
hang
out s o cia lly , w ork o n th e te ch nolo gy, a nd k e ep it c u rre nt.
Barry W ars aw : 'T he h ig hlig ht o f m y P yC on is t o g et t o geth er w it h
th e c o re d evelo pers
to h an g o ut s o cia lly , w ork o n t h e t e ch nolo gy,
an d k eep it c u rre n t.'
Mailm an's b een a ro und fo r fo re ve r n ow a nd it 's s till a v ia ble p ro je ct. I d o
th in k
th at y o u h ave to r e ally o pen u p, tr u st y o ur c o re d eve lo pers , a nd b e
willin g to hand
ove r parts of a pro je ct. G re at w eb desig ners re ally
unders ta nd th e te ch nolo gy a nd
ca n d esig n a g re at in te rfa ce th at lo oks
good and is fu n to use . That's gre at fo r m e
beca use th en I ca n
co nce ntr a te o n th e b it s th at r e ally in te re st a nd fir e m e u p.
We'v e h ad s o m e G oogle S um mer o f C ode p ro je cts a nd o ne o f o ur c o re
deve lo pers c a m e
fr o m th ere . H e's ju st d one a n a m azin g a m ount o f w ork
on o ur D ocke r im ages a nd s o m e
of th e g lu e la ye rs . It's ju st r e ally g re at to
be a ble to h ave d eve lo pers th at y o u
re ally lik e to w ork w it h , th at y o u
kn ow a re ju st r e ally s m art a nd fr ie ndly .
You n eed to h ave d eve lo pers th at w ill p ut fo rth th at k in d o f c o m munit y
asp ect th at
I lik e w it h P yth on. T he P yth on c o m munit y is w elc o m in g a nd
fr ie ndly , w it h a fo cu s o n
mento rin g p eople a s th ey c o m e in . S o I th in k
anoth er le sso n is to b e o pen w it h w hat
yo u d o a nd g iv e y o ur tim e a nd
yo ur e xp ertis e , b eca use it w ill c o m e b ack te nfo ld .
Barry W ars aw : 'I t h in k a n oth er le sso n is t o b e o pen w it h w hat y o u
do a n d g iv e y o ur
tim e a n d y o ur e xp ertis e.'

Dris co ll
: H ave y o u h ad a ny c h alle nges w it h th e M ailm an p ro je ct
th at y o u
did n't e xp ect to h ave ?
Wars aw
: O h y e ah. I d on't g et th is to o m uch th ese d ays b ut b eca use
Mailm an is fr e e a nd w e
giv e it a w ay, w e d on't r e ally e ve n k n ow a ll o f th e
people w ho u se it .
We d on't c o ntr o l M ailm an in a ny w ay a nd w e d on't te ll p eople w hat th ey
ca n a nd c a nnot
do w it h it . M ost p eople u se it fo r v e ry g ood th in gs, s u ch
as fo r th eir b ik in g c lu b,
or c e rta in ly in a lo t o f te ch d is cu ssio n lis ts . B ut
so m e p eople d o u se M ailm an fo r
nefa rio us p urp ose s, lik e sp am min g
people . O ne o f th e c h alle nges is th at w e g et c o nta cte d
when p eople h ave
been sp am med by unscru pulo us deve lo pers and we get a lo t of
th re ate nin g
em ails a t tim es, w hic h is v e ry
dis h earte nin g.
One o f th e th in gs th at I'v e le arn ed is th at p eople r e ach o ut to y o u in th ose
ca se s
when th ey a re fr u str a te d. T hey'r e g oin g th ro ugh p ain b eca use
th ey'r e gettin g sp am med
by so m ebody. They don't kn ow who is
sp am min g th em a nd th ey'r e n ot g ettin g a ny re lie f
fr o m th at p ers o n, s o
th ey s e arc h a ro und.
Now , w e p ut v e ry p ro m in ent n otic e s th at w e d o n ot c o ndone s p am a nd
we d o n ot a ppro ve
of u sin g
Mailm an fo r a ny k in d o f ille gal p urp ose s. W e
enco ura ge p eople to u se M ailm an fo r o pt- in ,
so th at y o u k n ow th at y o u'r e
sig nin g u p fo r s o m eth in g. B ut w e c a n't r e ally c o ntr o l
it .
Barry W ars aw : 'O ne o f t h e t h in gs t h at I h ave f o und h elp fu l is t o le t
peo ple k n ow t h at
th ere is a h um an o n t h e o th er s id e o f M ailm an .'
We d on't h ave a ny k in d o f a dm in is tr a tiv e a cce ss, b ut p eople r e ach o ut to
us in m om ents
of fr u str a tio n. O ne o f th e th in gs th at I h ave fo und h elp fu l is
to le t p eople k n ow
th at th ere is a h um an o n th e o th er s id e o f M ailm an.
Som etim es w e'l l d o a lit tle b it
of r e se arc h to s e e if w e c a n fin d a c o nta ct,
or fin d th eir h ostin g p ro vid er. E ve n
th e m ost fr u str a te d p ers o n is n orm ally
ve ry a ppre cia tiv e o f th at.
So th at w as r e ally c h alle ngin g b ack in th e e arly d ays. P eople w ould s e nd
ve ry n asty
em ails to m y p ers o nal e m ail a ddre ss a nd th at g ets re ally

fr u str a tin g. T here a re a ll
kin ds o f p eople o ut th ere o n th e in te rn et, r ig ht?
Dris co ll
: S o w hen w e sp oke fo r th e P yD ev o f th e W eek se rie s, yo u
mentio ned th at y o u w ork e d
at C anonic a l. W hat w as it lik e to w ork a t a
Lin ux d is tr ib utio n c o m pany?
Wars aw
: W ell, it w as re ally a w eso m e. I s to pped w ork in g th ere in A pril,
but I'd b een th ere
fo r te n y e ars . I re ally e njo ye d it a nd it w as a g re at
posit io n to be in , beca use I
fe lt th at I co uld re ally help th e P yth on
co m munit y fo r U buntu a nd D ebia n.
Work in g a t C anonic a l w as a g re at n exu s fo r h elp in g p eople w ho w ere
co nsu m ers o f a
Lin ux d is tr o , lik e U buntu o r D ebia n, a nd u se rs o f P yth on
on th ose p la tfo rm s. I'm a
co re d eve lo per fo r P yth on, s o w hen a p ro ble m
would o ccu r, I w as a ble to s e e w heth er
th e fix n eeded to g o in D ebia n o r
Ubuntu a nd a sk w heth er it n eeded to g o in u pstr e am
Pyth on o r g o in
so m e lib ra ry .
Barry W ars aw : 'I 'm a c o re d evelo per f o r P yth on, s o w hen a p ro ble m
would o ccu r, I w as
ab le t o s ee w heth er t h e f ix n eed ed t o g o in
Deb ia n o r U buntu a n d a sk w heth er it n eed ed
to g o in u pstr e am
Pyth on o r g o in s o m e lib ra ry .'
So I re ally h ad th e
opportu nit y to w ork v e ry c lo se ly w it h a w id e ra nge o f
Pyth on p ro je cts . I w as a ls o
able to in te ra ct w it h P yth on it s e lf a nd w ork o n
are as o f P yth on th at I th ought n eeded
to b e im pro ve d fo r d is tr ib utio n o n
th e L in ux d is tr o . S o it w as re ally fu n. It w as
a g re at e xp erie nce a nd I'm
re ally g la d th at I h ad th e o pportu nit y to d o it .
Dris co ll
: W hat e xa ctly d id y o u d o in y o ur ro le
a t C anonic a l? C ould y o u
exp la in th at?
Wars aw
: Y es, s o I w as a m em ber o f th e F oundatio ns te am , w hic h w as a
sm all te am th at w ork e d
on th is s o rt o f p lu m bin g la ye r o f a L in ux d is tr o .
So im agin e, a t th e b otto m most p art y o u h ave a k e rn el, rig ht? W e d id n't
do a ny k e rn el
work b eca use w e h ad a s e para te k e rn el te am . B ut a bove
th at yo u h ad th in gs lik e th e
boot p ro ce ss, co m pile rs , to olc h ain s, a nd

packa ge b uild in g th e a rc h iv e h ealt h . S o a s
th in gs la nded in th e a rc h iv e ,
yo u w ante d to m ake s u re th at it w as s ta ble a nd r o bust.
It's a ll th is s o rt o f
ra ndom m ix o f th in gs a bove th e k e rn el, b ut b elo w th e d eskto p.
One o f th e th in gs th at th e F oundatio n te am w as re sp onsib le fo r w as
la nguage in te rp re te rs .
Pyth on is fa ir ly p opula r fo r w rit in g s crip ts th at th e
opera tin g syste m it s e lf a nd
th e b uild p ro ce sse s u se , so it is a p re tty
im porta nt la nguage fo r U buntu a nd m any
Lin ux d is tr ib utio ns.
Barry W ars aw : 'O ne o f t h e t h in gs t h at I w as r e sp onsib le f o r w as t h e
gen era l h ealt h
of t h e P yth on e co syste m o n U buntu .'
One o f th e th in gs th at I w as r e sp onsib le fo r w as th e g enera l h ealt h o f th e
Pyth on
eco syste m o n U buntu . T hat in clu ded w ork in g o n tr a nsit io ns, lik e
tr y in g to m ove e ve ry b ody
to P yth on 3 . T hen a s n ew v e rs io ns o f P yth on
would c o m e o ut, w hile I d id n't d ir e ctly
do th e in te rp re te r, I d id w ork o n a ll
th e p acka ges th at w ere in vo lv e d.
There a re a lo t o f s te ps th at y o u h ave to g o th ro ugh in o rd er to m ake
Pyth on 3 .5 th e
defa ult v e rs io n o n U buntu . It's a lo ng p ro ce ss. A lo t o f
packa ges w on't b uild , o r
th ey h ave b ugs in th e n ew v e rs io n o f P yth on, s o
yo u h ave to fix th ose , p rio rit iz e
and s tu ff lik e th at. S o o ne o f th e m ain
th in gs th at I d id o n U buntu w as r e ally w ork
on th e P yth on e co syste m .
Again , I w as lo okin g a t th e to ols a nd
se ein g w hat p ain p oin ts U buntu
deve lo pers w ere h avin g w it h th e P yth on to ols . I w as
tr y in g to fig ure o ut
how to im pro ve th em a nd w here to im pro ve th em . F or e xa m ple , if
th ere
was s o m e fr ic tio n w it h u sin g p ip a nd s e tu pto ols o n U buntu , th en th e fix e s
mig ht
have to g o in to p ip a nd s e tu pto ols . It w as m y re sp onsib ilit y to b e
aw are o f w here
people w ere h avin g p ain s u sin g U buntu .
Barry W ars aw : 'I w as lo okin g a t t h e t o ols a n d s eein g w hat p ain
poin ts U buntu d evelo pers
were h avin g w it h t h e P yth on t o ols . I w as
tr y in g t o f ig ure o ut h ow t o im pro ve t h em
an d w here t o im pro ve
th em .'

In a ddit io n, I d id a lo t o f c o nsu lt in g w it h p eople w ho w ere u sin g P yth on o n
Ubuntu .
If p eople h ad P yth on q uestio ns, I w ould w ork w it h th em , a nsw er
th eir q uestio ns, a nd
do c o de r e vie w s.
I a ls o w ork e d w it h a lo t o f p eople in th e c o m munit y . If c o m munit y p eople
on U buntu
had q uestio ns a bout h ow P yth on w ork e d, o r h ad p ro ble m s, I
was o ne o f th e p eople th ey
co uld ta lk to a nd w ork w it h . A lo t o f it is
co m munit y -d riv e n, b ut I th in k if y o u re ally
want to m ake a d is tr ib utio n a
su cce ss, th en y o u h ave to p ut re so urc e s in to it . E ve ry
Lin ux d is tr ib utio n
puts re so urc e s in to it s c o m munit ie s, b eca use o th erw is e it 's ju st
goin g to
fa ll a part.
Barry W ars aw : 'A lo t o f it is c o m munit y -d riv en , b ut I t h in k if y o u
re ally w an t t o
make a d is tr ib utio n a s u ccess, t h en y o u h ave t o p ut
re so urc es in to it .'
Dris co ll
: L et's m ove o n to a s lig htly d if f e re nt to pic . W hat d o y o u th in k
make s P yth on s u ch
a g ood la nguage fo r
A I a nd m ach in e le arn in g rig ht
now ?
Wars aw
: P yth on is a
fa nta stic g lu e la nguage. It's a ls o v e ry e asy to le arn
and u se , b oth fo r e xp ert p ro gra m mers
and fo r re se arc h ers , fo r w hom
pro gra m min g is n ot th eir p rim ary v o ca tio n.
I th in k b oth o f th ese a sp ects m ake P yth on a g re at la nguage fo r d om ain s
lik e m ach in e
le arn in g. T he la nguage is v e ry m alle able a s y o u e xp erim ent,
but ro bust a s y o u b uild
big ger s yste m s. I th in k th is is a ls o a c o ntr ib utin g
fa cto r to w hy w e s e e P yth on b eco m in g
so p opula r in th e d ata s cie nce s.
These are ofte n te ch nolo gie s w here pro gra m min g is n 't
th e ce ntr a l
occu patio n, b ut k in d o f s e co ndary to th e c o re r e se arc h b ein g c o nducte d.
Dris co ll
: W hat c o uld w e d o to m ake
Pyth on a n e ve n b ette r la nguage fo r
AI a nd m ach in e le arn in g?
Wars aw
: I'm n ot s u re th at m uch
needs to c h ange w it h P yth on, b ut it 's
possib le th at th e P yth on e co syste m co uld b e
im pro ve d to g iv e m ore
vis ib ilit y to A I/m ach in e le arn in g lib ra rie s, a nd m ake it e asie r
to in te gra te
su ch lib ra rie s w it h o th er P yth on a pplic a tio ns, fr a m ew ork s, a nd lib ra rie s.

Dris co ll
: S o, ju st b eca use I'm c u rio us, w hat
a re y o u d oin g n ow ?
Wars aw
: I ju st s ta rte d w ork in g w it h L in ke dIn a c o uple o f w eeks a go. I
re ally lik e it . I
th in k it 's a g re at c o m pany a nd th ey u se a lo t o f P yth on. S o
I'm s till d oin g P yth on
work . I'm w ork in g o n P yth on w it h in L in ke dIn a nd I
lo ve th e te am .
I th in k L in ke dIn h as a g re at m is sio n a nd I a m p sych ed a bout w hat th e
co m pany is tr y in g
to d o. T he m is sio n is to c o nnect p eople w it h e co nom ic
opportu nit ie s, s o it 's k in d
of fu nny th at L in ke dIn h elp ed m e to fin d a jo b
and th at jo b h appened to b e w it h L in ke dIn !
Lin ke dIn a ls o h as a lo t o f o th er s tu ff th at it d oes. I r e ally lik e th e fo cu s o n
help in g
people to fin d th e rig ht fit fo r w hate ve r th ey w ant to d o in th eir
pro fe ssio nal c a re er.
Dris co ll
: S in ce y o u h ave s u ch a d eep k n ow le dge o f P yth on, c o uld y o u
te ll m e w here y o u s e e
Pyth on
g oin g a s a la nguage in th e fu tu re ?
Wars aw
: T hat's a re ally in te re stin g q uestio n. I th in k in s o m e w ays it 's
hard to p re dic t
where P yth on is g oin g. I'v e b een in vo lv e d in P yth on fo r 2 3
ye ars , a nd th ere w as n o
way I c o uld h ave p re dic te d in 1 994 w hat th e
co m putin g w orld w as g oin g to lo ok lik e
to day.
Barry W ars aw : 'I 'v e b een in vo lv ed in P yth on f o r 2 3 y ears , a n d t h ere
was n o w ay I c o uld
have p re d ic te d in 1 994 w hat t h e c o m putin g
world w as g oin g t o lo ok lik e t o day.'
I lo ok a t p hon es, Io T (In te rn et o f th in gs) d evic e s, a nd ju st th e w hole
la ndsca pe of
what co m putin g lo oks lik e to day, w it h th e clo ud and
co nta in ers . It's ju st a m azin g
to lo ok a ro und a nd s e e a ll o f th at s tu ff . S o
th ere 's n o re al w ay to p re dic t w hat P yth on
is g oin g to lo ok lik e e ve n fiv e
ye ars fr o m n ow , a nd c e rta in ly n ot te n o r fif te en y e ars
fr o m n ow .
I d o th in k
Pyth on's fu tu re is still ve ry b rig ht, b ut I th in k P yth on, a nd
esp ecia lly C Pyth on,
whic h is th e im ple m enta tio n o f P yth on in C , h as
ch alle nges. A ny la nguage th at's b een
aro und fo r th at lo ng is g oin g to
have s o m e c h alle nges. P yth on w as in ve nte d to s o lv e
pro ble m s in th e 9 0s

and th e c o m putin g w orld is d if f e re nt n ow a nd is g oin g to b eco m e
dif f e re nt
still.
Barry W ars aw : 'P yth on w as in ven te d t o s o lv e p ro ble m s in t h e 9 0s
an d t h e c o m putin g
world is d if f e re n t n ow a n d is g oin g t o b eco m e
dif f e re n t s till.'
I th in k th e ch alle nges fo r P yth on in clu de th in gs lik e p erfo rm ance a nd
mult i- c o re o r
mult i- th re adin g a pplic a tio ns. T here a re d efin it e ly p eople w ho
are w ork in g o n th at
stu ff a nd o th er im ple m enta tio ns o f P yth on m ay s p rin g
up lik e P yP y, J yth on, o r Ir o nP yth on.
Asid e fr o m th e c h alle nges th at th e v a rio us im ple m enta tio ns h ave , o ne
th in g th at P yth on
has a s a la nguage, a nd I th in k th is is it s r e al s tr e ngth , is
th at it s ca le s a lo ng
wit h th e h um an s ca le . F or e xa m ple , y o u c a n h ave o ne
pers o n w rit e u p s o m e s crip ts o n
th eir la pto p to s o lv e a p artic u la r p ro ble m
th at th ey h ave . P yth on's g re at fo r th at.
Barry W ars aw : 'O ne t h in g t h at P yth on h as a s a la n guag e, a n d I t h in k
th is is it s r e al
str e n gth , is t h at it s cale s a lo ng w it h t h e h um an s cale .'
Pyth on a ls o s ca le s to , le t's s a y, a s m all o pen s o urc e p ro je ct w it h m ayb e
10 or 15
people co ntr ib utin g. P yth on sca le s to hundre ds of people
work in g o n a fa ir ly la rg e
pro je ct, o r th ousa nds o f p eople w ork in g o n
massiv e s o ftw are p ro je cts .
Anoth er am azin g str e ngth of Pyth on as a la nguage is th at new
deve lo pers ca n co m e in
and le arn it easily and be pro ductiv e ve ry
quic kly . T hey c a n p ull d ow n a c o m ple te ly
new P yth on s o urc e c o de fo r a
pro je ct th at th ey'v e n eve r s e en b efo re a nd d iv e in a nd
le arn it v e ry e asily
and q uic kly . T here a re s o m e c h alle nges a s P yth on s ca le s o n th e
hum an
sca le , but I fe el lik e th ose are bein g so lv e d by th in gs lik e th e ty p e
annota tio ns,
fo r e xa m ple .
On v e ry la rg e P yth on p ro je cts , w here y o u h ave a m ix o f ju nio r a nd s e nio r
deve lo pers ,
it c a n b e a lo t o f e ff o rt fo r ju nio r d eve lo pers to u nders ta nd

how to u se a n e xis tin g
lib ra ry o r a pplic a tio n, b eca use th ey'r e c o m in g fr o m
a m ore s ta tic a lly -ty p ed la nguage.
So a lo t o f o rg aniz a tio ns th at a re b uild in g v e ry la rg e P yth on c o debase s
are a doptin g
ty p e a nnota tio ns, m ayb e n ot so m uch to h elp w it h th e
perfo rm ance o f th e a pplic a tio ns,
but to h elp w it h th e o nboard in g o f n ew
deve lo pers . I th in k th at's g oin g a lo ng w ay
in h elp in g P yth on to c o ntin ue
to s ca le o n a h um an s ca le .
Barry W ars aw : 'I t h in k if w e a d dre ss s o m e o f t h ose t e ch nic al
lim it a tio ns...t h en w e'r e
re ally s ettin g P yth on u p f o r a n oth er 2 0 y ears
of s u ccess a n d g ro w th .'
To m e, th e la nguage's s ca lin g
c a pacit y a nd th e w elc o m in g n atu re o f th e
Pyth on c o m munit y a re th e tw o th in gs th at
make P yth on s till c o m pellin g
eve n a fte r 2 3 y e ars , a nd w ill c o ntin ue to m ake P yth on
co m pellin g in th e
fu tu re . I th in k if w e a ddre ss s o m e o f th ose te ch nic a l lim it a tio ns,
whic h a re
co m ple te ly d oable , th en w e'r e re ally s e ttin g P yth on u p fo r a noth er 2 0
ye ars
of s u cce ss a nd g ro w th .
Dris co ll
: D o y o u s e e a ny n ew fe atu re s c o m in g to P yth on, o r is th ere
anyth in g e ls e th at y o u'r e
excit e d a bout?
Wars aw
: Y eah, a noth er
fr ie nd o f m in e, E ric S m it h , w ho's a ls o a c o re
deve lo per, c o m es u p w it h th ese g re at
fe atu re s th at y o u d on't k n ow h ow
yo u e ve r u se d P yth on w it h out.
One n ew fe atu re in P yth on 3 .6 is th e f- s tr in gs, th e fo rm at s tr in gs. I h ave
only u se d
f- s tr in gs in a c o uple o f p ro je cts , b eca use th ey'r e a P yth on 3 .6
fe atu re , b ut I lo ve
f- s tr in gs. I a ls o lo ve c o nte xtlib .
Barry W ars aw : 'I s ay t h is w it h e very r e le ase, b ut P yth on 3 .7 is t r u ly
goin g t o b e
th e b est e ver.'
I'm a ls o v e ry e xcit e d a bout P yth on 3 .7 . I s a y th is w it h e ve ry re le ase , b ut
Pyth on
3.7 is tr u ly g oin g to b e th e b est e ve r. W e'r e g oin g to s e e s o m e

gre at new lib ra rie s,
im pro ve d su pport fo r
asyn cio
, and bette r
perfo rm ance . P yth on d eve lo pm ent is a s v ib ra nt a s e ve r a nd I b elie ve th at
th e im pro ve m ents to o ur w ork flo w (fo r e xa m ple , th e s w it c h to G it a nd
Git H ub) h as r e ally
opened u p P yth on d eve lo pm ent to m any m ore p eople .
I lo ve th at fo lk s c a n e xp erim ent w it h c ra zy id eas, lik e th e g ile cto m y, w hic h
eve n
if th ey d on't p an o ut, p ro vid e fo dder fo r fu tu re d eve lo pm ent. C
Pyth on's im ple m enta tio n
is e asy to u nders ta nd, n avig ate , a nd c h ange,
and th is goes a lo ng way to m akin g it
a fr ie ndly pla tfo rm fo r
exp erim enta tio n a nd c h ange.
All th e w hile , w e h ave G uid o's c o ntin ued s te w ard sh ip a nd o th er lo ng-tim e
deve lo pers
pro vid in g v is io n a nd c o here nce , s o th at w hile P yth on to day
lo oks v e ry d if f e re nt to
Pyth on fr o m 2 0+ y e ars a go, it s till fe els lik e th e
sa m e w ell- d esig ned, c o nsis te nt,
easy to le arn , y e t s ca la ble la nguage.
Dris co ll
: W hat d o y o u th in k a bout th e lo ng lif e
o f P yth on 2 .7 ?
Wars aw
: W e a ll k n ow th at w e'v e g ot to g et o n P yth on 3 , s o P yth on 2 's
lif e is lim it e d. I
made it a m is sio n in sid e o f U buntu to tr y to g et p eople to
get o n P yth on 3 . S im ila rly ,
wit h in L in ke dIn , I'm re ally p sych ed, b eca use
all o f m y p ro je cts a re o n P yth on 3 n ow .
Pyth on 3 is so m uch m ore
co m pellin g th an P yth on 2 .
Barry W ars aw : 'W e a ll k n ow t h at w e'v e g ot t o g et o n P yth on 3 , s o
Pyth on 2 's lif e is
lim it e d .'
You d on't e ve n re aliz e a ll o f th e fe atu re s th at y o u h ave in P yth on 3 . O ne
of th e fe atu re s
th at I th in k is re ally a w eso m e is th e a syn c I/O lib ra ry . I'm
usin g th at in a lo t o f
th in gs a nd th in k it is a v e ry c o m pellin g n ew fe atu re ,
th at s ta rte d w it h P yth on 3 .4 .
Eve n w it h P yth on 3 .5 , w it h th e n ew a syn c
ke yw ord s fo r I/O -b ase d a pplic a tio ns,
asyn cio
w as ju st a m azin g.
There a re to ns o f th ese fe atu re s th at o nce y o u s ta rt to u se th em , y o u ju st
ca n't g o
back to P yth on 2 . It fe els s o p rim it iv e . I lo ve P yth on 3 a nd u se it
exclu siv e ly in
all o f m y p ers o nal o pen s o urc e p ro je cts . I fin d th at d ro ppin g
back to P yth on 2 .7 is
ofte n a c h ore , b eca use s o m any o f th e c o ol th in gs
yo u d epend o n a re ju st m is sin g,
alt h ough s o m e lib ra rie s a re a va ila ble in

Pyth on 2 c o m patib le b ack p orts .
I fir m ly b elie ve th at it 's w ell p ast th e tim e to fu lly e m bra ce P yth on 3 . I
would n't
writ e a lin e o f n ew c o de th at d oesn 't s u pport it , a lt h ough th ere
ca n b e b usin ess r e aso ns
to c o ntin ue to s u pport e xis tin g P yth on 2 c o de.
It's a lm ost n eve r th at d if f ic u lt to c o nve rt to P yth on 3 , a lt h ough th ere a re
still
a h andfu l o f d ependencie s th at d on't s u pport it , o fte n b eca use th ose
dependencie s
have been abandoned. It does re quir e re so urc e s and
ca re fu l p la nnin g th ough, b ut a ny
org aniz a tio n th at ro utin ely a ddre sse s
te ch nic a l d ebt s h ould h ave c o nve rs io n to P yth on
3 in th eir p la ns.
That s a id , th e lo ng lif e o f P yth on 2 .7 h as b een g re at. It's p ro vid ed tw o
im porta nt
benefit s I th in k. T he fir s t is th at it p ro vid ed a v e ry s ta ble v e rs io n
of P yth on, a lm ost
a lo ng-te rm s u pport re le ase , s o fo lk s d id n't h ave to
eve n th in k a bout c h anges in P yth on
eve ry 1 8 m onth s (th e ty p ic a l le ngth
of tim e n ew v e rs io ns a re in d eve lo pm ent) .
Barry W ars aw : 'P yth on 2 .7 's lo ng lif e a ls o a llo w ed t h e r e st o f t h e
eco syste m t o c atc h
up w it h P yth on 3 .'
Pyth on 2 .7 's lo ng lif e a ls o
allo w ed th e re st o f th e e co syste m to c a tc h u p
wit h P yth on 3 . S o th e fo lk s w ho w ere
ve ry m otiv a te d to s u pport it c o uld
sa nd d ow n th e s h arp e dges a nd m ake it m uch e asie r
fo r o th ers to fo llo w .
I th in k w e n ow h ave v e ry g ood to ols , e xp erie nce , a nd e xp ertis e
in h ow to
sw it c h to P yth on 3 w it h th e g re ate st c h ance o f s u cce ss.
I th in k w e re ach ed th e tip pin g p oin t s o m ew here a ro und th e P yth on 3 .5
re le ase . R egard le ss
of w hat th e n um bers s a y, w e'r e w ell p ast th e p oin t
where th ere 's a ny d ebate a bout
ch oosin g P yth on 3 , e sp ecia lly fo r n ew
co de. P yth on 2 .7 w ill e nd it s lif e in m id -2 020
and th at's a bout rig ht,
alt h ough n ot s o on e nough fo r m e! A t s o m e p oin t, it 's ju st
more fu n to
deve lo p in a nd o n P yth on 3 . T hat's w here yo u a re se ein g th e m ost
energ y
and e nth usia sm fr o m P yth on d eve lo pers .
Dris co ll
: W hat c h anges w ould y o u lik e
to s e e in fu tu re P yth on r e le ase s?
Wars aw
: I'v e b een th in kin g la te ly a bout s ig nif ic a nt c h anges to th e w ay

we deve lo p C exte nsio n
module s. I'd lik e to se e us get out of th at
busin ess, by adoptin g so m eth in g lik e Cyth on
as th e hig her-le ve l
la nguage a nd to ol fo r g enera tin g e xte nsio n m odule s. B y d oin g th is ,
we'd
la y th e g ro undw ork fo r im pro ve m ents in th e C A PI, u nco uple d fr o m a ll th e
exis tin g
exte nsio n m odule s o ut th ere .
We'd b e a ble to e xp erim ent w it h m ore in te rn al c h anges th at b re ak th e C
API, s u ch a s
re m ovin g th e G lo bal In te rp re te r L ock (G IL ) o r a doptin g a
tr a dit io nal g arb age c o lle cto r.
If y o u lo ok a t th e g ile cto m y w ork fo r e xa m ple
(th at is , a n e xp erim enta l b ra nch to
re m ove th e G IL ), it 's v e ry c o m ple x,
beca use it h as to m ain ta in c o m patib ilit y w it h
th e e xis tin g C A PI a s m uch
as possib le . If w e co uld bre ak th at, w it h out bre akin g so urc e -le ve l
co m patib ilit y w it h th ir d -p arty m odule s, w e'd be m uch m ore fr e e to
im pro ve th in gs in te rn ally .
Dris co ll
: T hank y o u, B arry W ars a w .

C hap te r 1 0. J essic a M cK ella r
J e ssic a M cK ella r
is a n A m eric a n s o ftw are e ngin eer a nd e ntr e pre neur.
S he is a m ain ta in er fo r s e ve ra l
open s o urc e p ro je cts a nd th e c o -a uth or o f
T w is te d N etw ork P ro gra m min g E sse ntia ls
. J e ssic a is a fo rm er d ir e cto r o f
t h e P yth on S oftw are F oundatio n (P SF) a nd a fo rm er
org aniz e r o f th e
B osto n P yth on U se r G ro up. S he is p assio nate a bout g ro w in g th e P yth on
c o m munit y a nd s e rv e s a s th e d iv e rs it y o utr e ach c h air fo r P yC on N orth
A m eric a .
J e ssic a is th e fo under a nd C TO o f P ilo t, a b ookke epin g fir m w hic h is
p ow ere d by so ftw are .
Pre vio usly , sh e w as th e fo under and VP of
e ngin eerin g fo r Z ulip , a re al- tim e c o lla bora tio n
sta rt- u p w hic h D ro pbox
a cq uir e d.
Dis cu ssio n t h em es: P yth on a n d a ctiv is m , t h e P SF, T w is te d .
Catc h u p w it h J essic a M cK ella r h ere : @ je ssic am ckella
M ik e D ris co ll
: C ould y o u g iv e a lit tle b ackg ro und
a bout y o urs e lf ?
J essic a M cK ella r
: I'm a n e ntr e pre neur, so ftw are e ngin eer, a nd o pen
s o urc e d eve lo per c u rre ntly liv in g
in S an F ra ncis co .
I a m e xtr e m ely p ro ud to p la y a r o le in P yth on c o m munit y in it ia tiv e s. I jo ke

th at I
don't e ve r ta ke v a ca tio n b eca use I ju st tr a ve l to s p eak a t P yth on
co nfe re nce s. T his
has g iv e n m e th e o pportu nit y to s p eak w it h a nd le arn
fr o m lo ca l P yth on c o m munit ie s
aro und th e w orld .
Jessic a M cK ella r: 'I a m e xtr e m ely p ro ud t o p la y a r o le in P yth on
co m munit y in it ia tiv es.'
I'm g ra te fu l to h ave w on th e
O'R eilly O pen S ourc e A w ard in 2 013 fo r m y
outr e ach e ff o rts in th e P yth on c o m munit y .
This w as r e ally r e co gniz in g th e
lo ng-te rm e ff o rts o f m any ta le nte d p eople , w ho I a m
als o lu cky to c a ll m y
fr ie nds.
I'm c u rre ntly a fo under a nd th e C TO o f a n e arly -s ta ge e nte rp ris e s o ftw are
co m pany,
where I a m d elig hte d to h ave b een u sin g a nd b enefit in g fr o m
Pyth on 3 fr o m th e g et- g o.
Pre vio usly , I w as a fo under a nd th e V P o f
engin eerin g a t Z ulip .
Befo re th at, I w as a co m pute r n erd a t M IT w ho jo in ed h er fr ie nds a t
Ksp lic e , a c o m pany
build in g a s e rv ic e fo r re bootle ss k e rn el u pdate s o n
Lin ux, th at w as a cq uir e d b y O ra cle .
These d iv e rs e e xp erie nce s g ot m e
onto th e F orb es 3 0 U nder 3 0 c la ss o f 2 017 fo r e nte rp ris e
so ftw are , ju st in
tim e to a ge o ut o f th e c a te gory .
Dris co ll
: S o w hy d id y o u fir s t
beco m e a p ro gra m mer?
McK ella r
: I h ad a lw ays lik e d u sin g c o m pute rs . A fa m ous fa m ily p hoto
sh ow s m e in fr o nt o f a n
Apple IIc i, w it h a b ottle in o ne h and a nd a m ouse
in th e o th er. B ut I d id n't h ave
any in te ntio ns a ro und le arn in g h ow to
pro gra m u ntil I w as in c o lle ge.
My fir s t d egre e is a ctu ally in c h em is tr y . W hile I w as ta kin g m y c h em is tr y
cla sse s,
many o f m y fr ie nds w ere in th e c o m pute r s cie nce d epartm ent. I
would s o rt o f w atc h
th em o ut o f th e c o rn er o f m y e ye a nd th in k to m yse lf
th at th ey s e em ed to b e le arn in g
a to olk it fu ll o f to ols fo r s o lv in g a b ro ad
ra nge o f p ro ble m s in th e w orld . I w ante d
th ose s kills to o.
I to ok a c o uple o f C S c la sse s in m y s o phom ore y e ar, w as im media te ly
hooke d a nd s e cre tly
got a s u m mer in te rn sh ip a t a s o ftw are c o m pany

wit h out te llin g m y ch em is tr y a dvis o r
(I d on't re co m mend th is ta ctic ). I
managed to c ra m a C S d egre e in to m y r e m ain in g c o uple
of s e m este rs .
Learn in g h ow to p ro gra m is a p ro fo und e xp erie nce . Y ou b eco m e flu ent
wit h in a s yste m
and le arn h ow to b re ak d ow n a nd s o lv e p ro ble m s w it h in it
in a s tr u ctu re d w ay. Y ou
gain c o nfid ence a s a d ebugger a nd a s a p ro ble m
so lv e r.
Jessic a M cK ella r: 'L earn in g h ow t o p ro gra m is a p ro fo und
exp erie n ce...y o u g ain c o nfid en ce
as a d eb ugger a n d a s a p ro ble m
so lv er.'
Contr ib utin g to fr e e a nd o pen s o urc e s o ftw are p ro je cts is a ls o a p ro fo und
exp erie nce .
You a re in stille d w it h th e m in dse t th at if y o u s e e s o m eth in g
th at c o uld b e b ette r,
in a la nguage, lib ra ry o r e co syste m , th en y o u c a n
work to geth er w it h o th er c o ntr ib uto rs
to m ake th at c h ange fo r e ve ry o ne's
benefit .
Jessic a M cK ella r: 'C ontr ib utin g t o f r e e a n d o pen s o urc e s o ftw are
pro je cts is a ls o
a p ro fo und e xp erie n ce.'
Belie vin g th at y o u h ave th e to ols to id entif y a p ro ble m in th e w orld , b re ak
it d ow n
in to s te ps, a nd w ork w it h o th ers to im ple m ent a s o lu tio n is a
pow erfu l m in dse t. It's
an a ctiv is t's m in dse t. P ro gra m min g
has p ro fo undly
im pacte d how I th in k about m yse lf and m y re sp onsib ilit y to m y
co m munit y .
It h as m otiv a te d m y tim e o n in it ia tiv e s ra ngin g fr o m te ach in g
pro gra m min g to c rim in al
ju stic e r e fo rm .
Jessic a M cK ella r: 'P ro gra m min g h as p ro fo undly im pacte d h ow I
th in k a b out m yself a n d
my r e sp onsib ilit y t o m y c o m munit y .'
So I'd s a y th at I le arn ed h ow to p ro gra m b eca use I w ante d th e p ro ble m -
so lv in g to olk it
th at p ro gra m mers h ave , b ut th e m ost e ndurin g e ff e ct is th at
it m ade m e a n a ctiv is t.
I h ave sin ce d evo te d a lo t o f m y e nerg y to

cre atin g o pportu nit ie s fo r o th ers to le arn
how to p ro gra m b eca use w e
need a s m any p eople a s p ossib le , o n th is p la net, to h ave
th e a ctiv is t's
min dse t th at p ro gra m min g e nco ura ges.
Jessic a M cK ella r: 'W e n eed a s m an y p eo ple a s p ossib le , o n t h is
pla n et, t o h ave t h e
activ is t's m in dset t h at p ro gra m min g
en co ura g es.'
Dris co ll
: W hy
Pyth on?
McK ella r
: I le arn ed P yth on b eca use th at w as th e la nguage u se d in m any
co m pute r s cie nce c la sse s
at M IT . I w as a s tu dent d urin g a b ig tr a nsit io n
fr o m L is p to P yth on a t th e u niv e rs it y .
I'v e s in ce u se d P yth on in e ve ry jo b I'v e e ve r h ad a nd in e ve ry c o m pany
I'v e s ta rte d.
One s h ould a lw ays u se th e r ig ht to ol fo r a ny ta sk, b ut P yth on
has su ch bro ad utilit y
and su ch a m atu re eco syste m , th at it has
fo rtu nate ly fr e quently b een th e r ig ht to ol.
Dris co ll
: H ow d id y o ur
fir s t s ta rt- u p c o m e a bout, J e ssic a ?
McK ella r
: M y fir s t s ta rt- u p w as K sp lic e , w hic h
ca m e o ut o f th e m aste r's
th esis o f o ur C EO , J e ff A rn old .
The K sp lic e te am h ad a to n o f c o lle ctiv e o pen s o urc e e xp erie nce , w hic h
help ed u s to
in te rfa ce w it h th e L in ux k e rn el c o m munit y . T he e xp erie nce
and k n ow le dge th at w e h ad
in o pen s o urc e a ls o s h aped h ow w e d id
so ftw are d eve lo pm ent in w hat c a m e to b e a h ig hly
dis tr ib ute d te am .
Dris co ll
: C an y o u te ll u s h ow y o u b eca m e a d ir e cto r
fo r th e P SF?
McK ella r
: M y P yth on co m munit y in vo lv e m ent sta rte d lo ca lly . I w as
work in g wit h th e Bosto n Pyth on
Use r G ro up to ru n a se rie s of
in tr o ducto ry w ork sh ops fo r new pro gra m mers , as part
of a div e rs it y
outr e ach in it ia tiv e . I th en b eca m e a n o rg aniz e r fo r B osto n P yth on.
Jessic a M cK ella r: 'M y P yth on c o m munit y in vo lv em en t s ta rte d

lo cally .'
The w ork b eca m e m ore g lo bal w hen I
w as in vit e d to th e in augura l c o hort
fo r th e PSF's Outr e ach and Educa tio n Com mit te e,
whic h fu nded
co m munit y b uild in g a nd e duca tio nal in it ia tiv e s in P yth on co m munit ie s
aro und th e w orld .
At th at p oin t, I'm g ra te fu l
th at J e sse N olle r, P SF's d ir e cto r, e nco ura ged
me to re ach fo r an eve n la rg er pla tfo rm
fo r co m munit y build in g. H e
nom in ate d m e to b eco m e a d ir e cto r o n th e b oard . I w as e le cte d
in 2 012
and s e rv e d fo r th re e y e ars .
Dris co ll
: W hat w as y o ur
fo cu s a s a d ir e cto r a t th at tim e?
McK ella r
: M y fo cu s w as o n g lo bal c o m munit y d eve lo pm ent, in clu din g
pro vid in g fin ancia l s u pport,
and a lo t o f o rg aniz a tio nal in fr a str u ctu re fo r
use r g ro ups, c o nfe re nce s a nd o utr e ach
in it ia tiv e s.
Dris co ll
: W hat le sso ns have yo u le arn ed as a co re
main ta in er of
Tw is te d?
McK ella r
: M y fir s t e ve r o pen s o urc e c o ntr ib utio n w as to T w is te d, w hic h is
an e ve nt- d riv e n
netw ork in g e ngin e w rit te n in P yth on!
I d is tin ctly re m em ber th at fo rm ativ e e xp erie nce . I w as u sin g T w is te d in a
pro je ct
at an in te rn sh ip and I w as usin g so m e docu m enta tio n th at I
th ought c o uld b e c le are r.
I s a id , "H ey, th is is m y c h ance to c o ntr ib ute to
an o pen s o urc e p ro je ct. I'm g oin g
to g o fo r it ."
I p ro bably re ad th ro ugh th e co ntr ib utio n g uid elin es th re e tim es to p to
botto m . I w as
anxio us th at I m ig ht m ake a m is ta ke a nd s o m eone w ould
ye ll a t m e. I re m em ber id lin g
nerv o usly in th e IR C c h annel, o penin g a
new is su e in th e is su e tr a cke r, a tta ch in g
a
diff
a nd g enera tin g a nd
re genera tin g th e d ocs to c o nvin ce m yse lf th at e ve ry th in g lo oke d
perfe ct. I
hove re d m y hand ove r th e su bm it butto n fo r a so lid m in ute befo re
work in g
up th e n erv e to c lic k.
The o utc o m e w as th at
Gly p h L efk o w it z , th e c re ato r o f T w is te d (a nd a
deca de la te r s till a fr ie nd a nd c o w ork e r),
patie ntly w alk e d m e th ro ugh th e

re vie w pro ce ss. H e la nded m y ch ange and enco ura ged
me to ke ep
partic ip atin g. I h ad a n in cre dib ly p osit iv e fir s t e xp erie nce o f c o ntr ib utin g
to
an o pen s o urc e p ro je ct.
Jessic a M cK ella r: 'I h ad a n in cre d ib ly p osit iv e f ir s t e xp erie n ce o f
co ntr ib utin g t o
an o pen s o urc e p ro je ct.'
That e nded u p b ein g a g ood in ve stm ent fo r T w is te d a nd fo r m e, a s I w ent
on to c o ntr ib ute
many m ore p atc h es, b eco m e a c o re m ain ta in er a nd w rit e
a b ook a bout th e lib ra ry .
The e ndurin g o pen s o urc e le sso n fr o m T w is te d h as th us b een a bout th e
im porta nce o f
esta blis h in g a c u lt u re th at w elc o m es n ew c o ntr ib uto rs . T his
is b oth b eca use it is
th e rig ht th in g to d o a nd b eca use a ttr a ctin g a nd
re ta in in g a d iv e rs e c o ntr ib uto r b ase
is c rit ic a l fo r s u sta in in g a la rg e o pen
so urc e p ro je ct, o n w hic h m any p eople a nd c o m panie s
depend.
Jessic a M cK ella r: 'T he e n durin g o pen s o urc e le sso n f r o m T w is te d
has t h us b een a b out
th e im porta n ce o f e sta b lis h in g a c u lt u re t h at
welc o m es n ew c o ntr ib uto rs .'
Dris co ll
: C an yo u te ll m e m ore about P ilo t
, th e co m pany th at yo u
fo unded?
McK ella r
: P ilo t
is a b ookke epin g fir m (
http ://p ilo t.c o m
). U nlik e e xis tin g
bookke epin g se rv ic e s, w e
are usin g so ftw are to auto m ate th e heavy
lif tin g a nd a s m all te am o f p ro s to h andle
th e re st. T his re su lt s in b ooks
th at a re m ore a ccu ra te ( le ss w ork a nd w orry fo r y o u)
and c h eaper. It h as
been a d elig ht to b uild th is c o m pany o n P yth on 3 !
Dris co ll
: T hank y o u, J e ssic a M cK ella r.

C hap te r 1 1 . T a re k Z ia d é
T a re k Z ia dé
is a F re nch P yth on d eve lo per a nd a uth or. P ast ro le s h a ve
i n clu ded R &D d eve lo per a t
Nuxe o and so ftw are engin eer at M ozilla .
T o day T a re k is a s ta ff a pplic a tio n e ngin eer
at M ozilla , w here h e c re ate s
t o ols fo r deve lo pers . H e has w rit te n se ve ra l P yth on books,
in both
E nglis h a nd F re nch , in clu din g
Exp ert P yth on P ro gra m min g
and
Pyth on
M ic ro se rv ic e s D eve lo pm ent
. Ta re k is th e fo under of A fp y, a Fre nch
P yth on use r gro up and has deliv e re d ta lk s
at both PyC on and
E uro P yth on. H e r e gula rly c o ntr ib ute s to o pen s o urc e P yth on p ro je cts .
Dis cu ssio n t h em es: A I, v 2.7 /v 3.x , A fp y.
Catc h u p w it h T are k Z ia d é h ere : @ ta re k_zia d e
M ik e D ris co ll
: W hy
did y o u b eco m e a p ro gra m mer?
T a re k Z ia d é
: In h in dsig ht, I b eca m e a p ro gra m mer fo r tw o re aso ns: to
b eco m e th e g od o f m y lit tle
world a nd to im pre ss m y m om , w ho is a
p ro gra m mer a s w ell.
W hen I
was s ix y e ars o ld , I w as a t a fa ir w it h m y m om . T here w as a g ia nt
p aper s h eet o n th e
flo or, w it h a tu rtle th at h ad a p en. Y ou c o uld p ro gra m
t h e tu rtle w it h c a rd s to te ll
it w here to g o a nd w hen to p ut th e p en d ow n
o n th e p aper. I w as o bse sse d w it h th at
tu rtle . T he fe elin g o f p la nnin g

what w ould h appen fe lt s o g ood.
Years la te r, m y m om g ot u s a s e rio us c o m pute r (th e T hom so n T O 8D ),
and I c o uld p ro gra m
in B ASIC a nd A sse m bly . I b uilt in cre dib le th in gs.
Wit h m y m om 's h elp , I w as d riv in g
ro bots .
Dris co ll
: W hat s o rt o f th in gs d id y o u d o
wit h th e r o bots w it h y o ur m om ?
Zia d é
: W ell, th e c o m pute r w e b ought h ad a p ro gra m mable s e ria l p ort a nd
exte nsio ns to g et
a p ara lle l p ort, w hic h w as q uit e r a re b ack th en.
We w ere d riv in g s te p e ngin es in B ASIC o r A sse m bly (w it h a c a rtr id ge),
sin ce th e p orts
co uld b e d ir e ctly a ddre sse d. T his w as n oth in g fa ncy, b ut
as a k id , b ein g a ble to d o
at h om e s o m eth in g s im ila r to w hat w e w ere
doin g w it h th at tu rtle a m aze d m e.
My m om a ls o g ot o ne o f th ose fa ncy O liv e tti la pto ps, w it h a s m all n eedle s
prin te r
th at c o uld p rin t s tu ff in th re e c o lo rs . W e w ere h avin g fu n p rin tin g
fr a cta ls . M y m om
was d oin g th e h eavy lif tin g (a s a m ath te ach er) a nd I
was ju st tw eakin g th e c o lo rs .
Dris co ll
: S o h ow d id y o u c o m e a cro ss P yth on?
Zia d é
: W hen I s ta rte d
c o din g p ro fe ssio nally in th e n in etie s, I w as u sin g
Borla nd to ols ( C ++B uild er a nd
Delp hi) w hic h c o uld u se V C L c o m ponents .
My co m pany bought so m e VC L co m ponents , but we were hig hly
fr u str a te d b y th e p oor s u pport
fr o m th eir a uth ors a nd s o m e b ugs. T hat's
when I d is co ve re d th e In dy P ro je ct, w hic h
was d eve lo pin g a nd re le asin g
open so urc e V C L co m ponents th at p ro vid ed m ost n etw ork
pro to co ls .
That lib ra ry w as to u s, w hat R equests is to P yth on to day.
Tare k Z ia d é: 'C om munit ie s b uilt a ro und o pen s o urc e p ro je cts s tr u ck
me a s t h e w ay t o
go in s o ftw are c o m putin g.'
I g ot in tr ig ued b y th is o pen s o urc e c o nce pt. C om munit ie s b uilt a ro und
open s o urc e
pro je cts s tr u ck m e a s th e w ay to g o in s o ftw are c o m putin g.
Thro ugh m y o nlin e re se arc h ,
I fo und o ut a bout th e Z ope P ro je ct
a nd

eve ntu ally d is co ve re d P yth on th ro ugh th at. A fe w m onth s la te r, I jo in ed a
co m pany
th at w as b uild in g a Z ope C M S.
Dris co ll
: H ave y o u d one a nyth in g w it h r o bots u sin g P yth on?
Zia d é
: N ot r e ally . I h acke d a b it o n a R asp berry P i w hen I fir s t g ot o ne. I
als o h acke d
a W ir e le ss G hetto B la ste r u sin g a
su it c a se , s o m e o ld c a r
sp eake rs a nd a R asp berry P i, w it h a W i- F i d ongle a nd M opid y.
Tare k Z ia d é: 'I a ls o h acked a W ir e le ss G hetto B la ste r u sin g a
su it c ase, s o m e o ld c ar
sp eakers a n d a R asp berry P i.'
I lo oke d at th e O penC V lib ra ry th ro ugh P yth on to do so m e im age
pro ce ssin g. M ost o f
th e o th er e le ctr o nic s p ro je cts th at I w ork e d o n w ere
on A rd uin o a nd it s p se udo C la nguage.
My m ost a dva nce d p ro je ct w as a
sm all R C c a r a nd th at w as a bout it . I g ot a lit tle
bit b ore d a fte r th at.
Dris co ll
: P yth on is b ig in A I a nd m ach in e le arn in g a t th e m om ent. W hat
do y o u th in k m ake s
Pyth on s o
popula r?
Zia d é
: I th in k th at P yth on h as b eco m e p opula r fo r A I b eca use th e S ciP y
co m munit y h as b uilt
so m e s ta te -o f- th e-a rt fr a m ew ork s a nd lib s in th e p ast
fe w y e ars (p andas, s cik it - le arn ,
IP yth on/J u pyte r) th at lo w er th e b ar fo r
scie ntis ts to u se P yth on in ste ad o f R o r o th er
to ols .
Tare k Z ia d é: 'A I a n d m ach in e le arn in g in novatio n is s p earh ead ed b y
acad em ic s...P yth on
beco m es a n atu ra l f it f o r t h em .'
AI a nd m ach in e le arn in g in nova tio n is s p earh eaded b y a ca dem ic s. S in ce
Pyth on h as s te adily
gro w n a s o ne o f th e m ain la nguages fo r le arn in g
pro gra m min g in a ca dem ic s, P yth on b eco m es
a n atu ra l fit fo r th em .
Dris co ll
: W hat d id y o u p ers o nally lik e a bout P yth on?
Zia d é
: I fe ll in lo ve w it h
Pyth on and it s co m munit y . P yth on is open
so urc e , v e rs a tile , a nd p ow erfu l, y e t s im ple
to c o de.

Com in g fr o m a C ++ a nd D elp hi b ackg ro und, a t fir s t I th ought th at P yth on
was a w eak
scrip tin g la nguage th at c o uld n ot b e u se d to b uild s e rio us
applic a tio ns. E ve ntu ally ,
I b eca m e im pre sse d b y h ow s im ple it w as to
cre ate Pyth on pro gra m s th at were co ncis e
and str a ig htfo rw ard to
unders ta nd.
C++ a nd D elp hi
lo oke d o ve r-e ngin eere d a t th at p oin t fo r a ll o f th e n etw ork
applic a tio ns th at I w as
build in g. I co uld ju st w rit e P yth on scrip ts th at
fo llo w ed th e K IS S p rin cip le a nd b uild
se rio us w eb a pplic a tio ns th at w ay.
Dris co ll
: W hat w ould y o u s a y a re P yth on's s tr e ngth s a nd w eakn esse s a s
a la nguage?
Zia d é
: T o day, w it h o ve r a d eca de o f P yth on p ro gra m min g b ehin d m e, I
th in k th at P yth on's
big gest s tr e ngth is h ow v is io nary G uid o v a n R ossu m
and th e P yth on-D ev te am a re . A s
fa r a s I c a n te ll, e ve ry d ecis io n th at w as
made in th e la st 2 0 y e ars w as a g ood o ne.
Tare k Z ia d é: 'P yth on's b ig gest s tr e n gth is h ow v is io nary G uid o v an
Rossu m a n d t h e
Pyth on-D ev t e am a re .'
Fro m th e m em ora ndum (a C Pyth on fr e eze desig ned so th at oth er
im ple m enta tio ns lik e
PyP y and Jyth on co uld ca tc h up), to how
asyn ch ro nous fe atu re s w ere g ra dually a dded,
Pyth on g ot m odern iz e d in
th e r ig ht d ir e ctio n.
Each tim e th at P yth on w as g ettin g a lit tle b it b ehin d c o m pare d to o th er
la nguages,
anoth er fe atu re would be added. Unlik e so m e oth er
la nguages th at h ad a s te lla r s ta rt,
th en fa ded a gain , P yth on is s te adily
gettin g b ig ger e ve ry y e ar.
One w eakn ess fo r P yth on is
th e s ta ndard lib ra ry . T he fa ct th at a p acka ge
added in th e s td lib is ra re ly re m ove d
is a n is su e. F or in sta nce , th e s td lib
cu rre ntly h as tw o c la sse s n am ed F utu re th at
are s lig htly d if f e re nt. O ne is
in
asyncio
a nd o ne is in
concurrent
. I w is h P yth on h ad a b ette r s to ry fo r
it s s td lib .
I th in k th e b ig gest w eakn ess o f P yth on is th e P yth on 2 v e rs u s P yth on 3

neve r-e ndin g
debate . T hat is su e d ro ve a w ay s o m e d eve lo pers , b eca use
of th e u nce rta in ty a bout w hic h
ve rs io n to u se . It lo oks lik e w e'r e g ettin g
past th at d ebate n ow , w hic h is g re at.
Tare k Z ia d é: 'I t h in k t h e b ig gest w eakn ess o f P yth on is t h e P yth on 2
vers u s P yth on
3 n ever-e n din g d eb ate .'
Dris co ll
: W hat is y o ur o pin io n o n th e
lo ng lif e o f P yth on 2 .7 ?
Zia d é
: I th in k th at th e tr a nsit io n to ok a w hile but it is happenin g
tr a nsp are ntly n ow a nd
it is a s u cce ss. T he P yth on 2 v e rs u s 3 d ays a re
ove r, sin ce th e P yth on 3 e co syste m
is n ow m atu re e nough fo r m ost
pro je cts .
To m y k n ow le dge,
th ere a re n o m ajo r lib s o r fr a m ew ork s th at a re s till
la ckin g P yth on 3 su pport. S o
th ere 's n o g ood re aso n to sta rt a n ew
pro je ct u sin g P yth on 2 .7 . P eople ju st u se P yth on
and fo r m ost o f th em it
will h appen to b e P yth on 3 . O ne d ay P yth on 2 .7 w ill c e ase
to e xis t a nd
nobody w ill r e ally m is s it .
Tare k Z ia d é: 'O ne d ay P yth on 2 .7 w ill c ease t o e xis t a n d n obody w ill
re ally m is s it .'
Dris co ll
: H ow d id y o u e nd u p b eco m in g a n a uth or o f P yth on b ooks?
Zia d é
: W hen I sta rte d pro gra m min g in Z ope and P yth on, I w as th e
cre ato r a nd m ain ta in er
of a F re nch fo ru m
ca lle d Z opeur. I w as s p endin g a
lo t o f tim e a nsw erin g a ll o f th e q uestio ns.
Zopeur sta rte d as a one-m an pro je ct, so if I sto pped answ erin g
questio ns, th en n obody
els e a nsw ere d th em . I w as a ls o le arn in g s o m uch
by a ctu ally s e arc h in g fo r a nsw ers
and b y d iv in g in to th e d eta ils .
Tare k Z ia d é: 'I w as a ls o le arn in g s o m uch b y a ctu ally s earc h in g f o r
an sw ers a n d b y
div in g in to t h e d eta ils .'

The fir s t b ook th at I w ro te a bout P yth on c a m e a bout b eca use I w ante d to
div e d eeply
in to P yth on a nd m ake m y w ork u se fu l to o th ers . I w as fillin g a
gap to o, s in ce th ere
were n o o rig in al b ooks in F re nch a bout P yth on.
Dris co ll
: W hat h ave y o u
le arn ed in th e w rit in g p ro ce ss?
Zia d é
: W rit in g a b ook is a lo ng a nd e xh austin g p ro je ct. T he fir s t b ook
to ok m e n in e m onth s
and w as v e ry p ain fu l to fin is h . It's e asy to q uit . It's
als o c o m mon to g et lo st in
deta ils a nd fo rg et a bout th e b ig p ic tu re . I'v e
le arn ed h ow to o rg aniz e m y th oughts
and k e ep th e b ig p ic tu re in m y
head.
When I w ro te m y fir s t b ook in E nglis h , I a ls o le arn ed th e h ard w ay th at it 's
dif f ic u lt
to w rit e in a non-n ativ e la nguage. You need to ke ep yo ur
se nte nce s a s s tr a ig htfo rw ard
and s h ort a s p ossib le . I w as a ls o e xp ose d
to a la rg er c o m munit y o f r e aders , fo r b ette r
or w ors e .
The la st th in g to n ote
about w rit in g b ooks is th at y o u n eed to a cce pt th at
yo ur b ook w ill n eve r b e p erfe ct.
By th e tim e y o u h ave fin is h ed w rit in g,
and yo u h ave re ad b ack th ro ugh th e fir s t ch apte rs ,
yo u w ill w ant to
re w rit e th in gs a ll o ve r a gain .
Tare k Z ia d é: 'Y ou n eed t o a ccep t t h at y o ur b ook w ill n ever b e
perfe ct.'
Dris co ll
: H ave y o u le arn ed
a nyth in g fr o m y o ur r e aders ? If s o , w hat?
Zia d é
: I'v e le arn ed a lo t fr o m fe edback fr o m m y re aders . I s till g et a fe w
em ails fr o m
re aders w antin g to s h are th eir th oughts .
Som etim es re aders w ant to p oin t o ut s o m e m is ta ke s o r s h are s o lu tio ns
th at th ey th in k
are b ette r. I h ave re ce iv e d a fe w in te re stin g th re ads th at I
wis h h ad b een a va ila ble
to m e b efo re m y b ooks w ere p ublis h ed. I th in k
books th at a re p ublis h ed o n th e w eb
in re al tim e, a llo w in g re aders to
se nd fe edback as th e w rit e r deliv e rs ch apte rs , are
su perio r fo r th at
re aso n.
Dris co ll
: A re y o u a w are o f a ny o th er b ooks a bout P yth on th at h ave c o m e

out in F re nch s in ce y o urs w ere p ublis h ed?
Zia d é
: T o b e fa ir , th ere w as a Z ope b ook b efo re m in e. B ut a s fa r a s I
kn ow , m in e w as th e
fir s t b ook e ntir e ly d edic a te d to P yth on w hic h w as
writ te n in F re nch , b y a n ativ e sp eake r.
Sin ce th en, th ere h ave b een
doze ns o f b ooks w rit te n in F re nch a bout P yth on. I a m th e
old g uard n ow .
Tare k Z ia d é: 'M in e w as t h e f ir s t b ook e n tir e ly d ed ic ate d t o P yth on
whic h w as w rit te n
in F re n ch , b y a n ativ e s p eaker.'
Dris co ll
: W hy d id y o u fo und th e
Fre nch P yth on U se r G ro up, A fp y?
Zia d é
: A s I m entio ned e arlie r, I w as m ain ta in in g a
Zope/P yth on fo ru m
ca lle d
Zopeur. A t s o m e p oin t I h ad th e id ea o f h avin g a m eetin g in re al
lif e in P aris , w it h
a d oze n o f th e a ctiv e m em bers . W e m et fo r b eers a nd
we fo unded a fo undatio n a ro und
Pyth on. A fte r th at, I s h ut d ow n m y fo ru m
and w e b uilt A fp y o n th e g ro und.
Dris co ll
: W hat ch alle nges did yo u fa ce th en and are th ere any
ch alle nges c u rre ntly ?
Zia d é
: T he fir s t fe w y e ars o f
ru nnin g A fp y w ere g re at. W e w ere a ll g ood
fr ie nds u nit e d a ro und o ur p assio n fo r P yth on.
The fir s t c h alle nge th at w e m et w as h ow to in te gra te F re nch c o m panie s
th at w ante d
to be part of A fp y. T hat to ok us a fe w ye ars , beca use
ente rp ris e s w ante d to u se o ur
fo undatio n as a to ol to pro m ote th eir
busin ess (s o m etim es a ggre ssiv e ly ). W e w ere ris kin g
lo sin g th e o rig in al
sp ir it o f A fp y.
Tare k Z ia d é: 'W e w ere r is kin g lo sin g t h e o rig in al s p ir it o f A fp y.'
We w ere als o a bit para noid about w hat w ould happen if se ve ra l
deve lo pers fr o m th e
sa m e co m pany were ele cte d to th e ste erin g
co m mit te e. B ut w hen w e s ta rte d to o rg aniz e
PyC on F ra nce , it b eca m e a
natu ra l fit fo r th ose c o m panie s to b e s p onso rs . In h in dsig ht,
I th in k th at

we d id th e r ig ht th in g b y b ein g p ro te ctiv e .
Anoth er c h alle nge w as tr y in g to h ave m ore d iv e rs it y in A fp y. W e w ere
mostly m en a nd
I w ante d to m ake o ur fo undatio n m ore w elc o m in g to
wom en. I d id s o m e w ork a ro und th at
and fo und th at d iv e rs it y w as a v e ry
co ntr o ve rs ia l to pic . E ve ntu ally , I g ot b urn t o ut
fr o m p olit ic s a nd th e w ork
was n ot fu n a nym ore .
Tare k Z ia d é: 'E ven tu ally , I g ot b urn t o ut f r o m p olit ic s a n d t h e w ork
was n ot f u n a n ym ore .'
I w as A fp y p re sid ent fo r s e ve n y e ars , s o I fe lt th at it w as th e r ig ht tim e to
move
on. I a m n ot s u re w hat th e c u rre nt s ta tu s o f A fp y is , s in ce I'm n ot
in vo lv e d. A fp y
still lo oks lik e a v ib ra nt u se r g ro up th ough, w hic h is g re at.
Dris co ll
: W hat m ade yo u ch oose Zope ove r
so m e of th e oth er
alt e rn ativ e s?
Zia d é
: T he s ta ndard w as P H P-p ow ere d fr a m ew ork s b ack th en, b ut Z ope
was th e c o ol s tu ff .
Zope w as v e ry in nova tiv e a nd w it h P yth on it w as m ore
th an w eb p ages.
Tare k Z ia d é: 'Z ope w as v ery in novativ e a n d w it h P yth on it w as m ore
th an w eb p ag es.'
Plo ne w as s ta rtin g to ta ke
off a nd g et v e ry p opula r in F ra nce . C om panie s
th at s p ecia liz e d in b uild in g a C M S fo r
gove rn m ent a gencie s o fte n u se d
Plo ne, b eca use it h ad m ost fe atu re s a lr e ady b uilt in .
Plo ne, a t o ne p oin t,
was a t th e to p o f th e g am e fo r a cce ssib ilit y a nd g ro upw are fe atu re s.
Dris co ll
: W hic h
Pyth on w eb fr a m ew ork d o y o u u se n ow a nd w hy d o y o u
use it ?
Zia d é
: A t M ozilla w e d o a lo t o f D ja ngo a nd F la sk, a nd a b it o f P yra m id .
Occa sio nally w e
use so m e Tw is te d and To rn ado. S in ce w e'r e now
sh ip pin g m ost s tu ff in D ocke r im ages,
deve lo pers th at s ta rt n ew p ro je cts

are not tie d to sp ecif ic P yth on ve rs io ns anym ore .
So asyn ch ro nous
fr a m ew ork s a re s ta rtin g to g et u se d.
When I c a n p ic k m y fr a m ew ork o f c h oic e , I lik e to u se B ottle , fo r v e ry
sim ple w eb
se rv ic e s a nd F la sk, fo r b ig ger p ro je cts th at n eed a b it o f U I.
There a re a la rg e n um ber
of F la sk lib ra rie s o ut th ere . T hat s a id , th e n ext
se rv e r-s id e p ro je ct th at I w ill
sta rt w ill b e
aiohttp
, th at's fo r s u re .
Dris co ll
: A re y o u w ork in g o n a ny
open s o urc e p ro je cts y o urs e lf th at y o u
would lik e to ta lk a bout?
Zia d é
: I w ork o n s e ve ra l p ro je cts , b ut a p ro je ct th at I a m o bse sse d w it h
rig ht now is
molotov
(
http ://m olo to v.r e adth edocs.io /
). It's a sm all lo ad
te stin g to ol, b ase d o n P yth on 3 .5 + a nd
aiohttp
c lie nt, th at w e'r e u sin g to
te st o ur w eb s e rv ic e s.
Tare k Z ia d é: 'A p ro je ct t h at I a m o bsessed w it h r ig ht n ow is
molo to v.'
The desig n fo cu se s on m akin g it as str a ig htfo rw ard as possib le fo r
deve lo pers to w rit e
a lo ad te st, b y d escrib in g a s ce nario u sin g s im ple
Pyth on c o ro utin es. O nce w e h ave
a s e t o f th ose fu nctio ns, th en th ey a re
use d to r u n s im ple s m oke te sts , lo ad te sts
and d is tr ib ute d lo ad te sts .
Thanks to
asyncio
a nd
aiohttp
, th e to ol c a n s e nd a p re tty a m azin g lo ad
on o ur se rv ic e s a nd w e'r e a ble to b re ak
most se rv ic e s w it h a sin gle
molotov
c lie nt. I a m a ddin g o n th e to p o f th is to ol s o m e C I H elp ers , s o w e
ca n c o ntin uously
te st th e p erfo rm ance o f o ur s e rv ic e .
One e xte nsio n th at I a m g oin g to a dd th is q uarte r is th e a bilit y to d eplo y a
sta ck
wit h D ocke r im ages o n A W S. T his w ill h appen p rio r to ru nnin g th e
lo ad te st a nd g ra b
back m etr ic s o nce it 's d one. W e a ls o h ave a
big ger
pro je ct c a lle d A rd ere , th at d riv e s A W S E C S fo r d oin g d is tr ib ute d te sts .
You
ca n fo llo w a ll o f th e w ork o n th ose to ols a t
http s://g it h ub.c o m /lo ads
.
Mik e D ris co ll: W hat a re y o u m ost e xcit e d a b out in P yth on t o day?
Zia d é
: A syn ch ro nous p ro gra m min g. T he a ddit io n o f
async/await
in th e

la nguage a nd p ro je cts lik e
aiohttp
a re tr u ly p uttin g P yth on b ack in to th e
gam e o f b uild in g n etw ork a pps. O f c o urs e ,
we h ave b een a ble to d o th at
wit h Tw is te d fo r ove r a deca de, but now it 's part of
th e co re and
im ple m ente d in a b eautif u l w ay. It's a s e asy a s in N ode.js to b uild a syn c
web a pps in P yth on.
Dris co ll
: W hat c h anges
would y o u lik e to s e e in fu tu re P yth on r e le ase s?
Zia d é
: I'd lo ve to s e e P yP y o n a p ar w it h C Pyth on (m ayb e w e s h ould
have y e t a noth er m em ora ndum
so th at P yP y c a tc h es u p) a nd h ave th e
abilit y to ru n a ny o f m y p ro je cts w it h it (in clu din g
C e xte nsio ns). M ore
anecd ota lly , I w ould lo ve to s e e
setup.py
k ille d in o ur p acka gin g s yste m .
It's th e s o urc e o f m any is su e s. I'v e tr ie d a nd fa ile d
(s e e P EP 3 90), b ut
mayb e o ne d ay it w ill h appen.
Dris co ll
: T hank y o u, T a re k Z ia dé.

C hap te r 1 2. S eb astia n R asch ka
S ebastia n R asch ka
re ce iv e d h is d octo ra te in Q uantit a tiv e B io lo gy a nd
B io ch em is tr y and M ole cu la r Bio lo gy
in 2017, fr o m M ic h ig an Sta te
U niv e rs it y . H is re se arc h a ctiv it ie s in clu ded th e d eve lo pm ent
of n ew d eep
l e arn in g arc h it e ctu re s to so lv e pro ble m s in th e fie ld of bio m etr ic s.
S ebastia n
is th e
bests e llin g a uth or o f
Pyth on M ach in e L earn in g
, w hic h
r e ce iv e d th e A C M B est o f C om putin g a w ard in 2 016. H e c o ntr ib ute s to
m any o pen
so urc e p ro je cts in clu din g s cik it - le arn . M eth ods th at S ebastia n
i m ple m ente d a re b ein g
use d in re al- w orld m ach in e le arn in g a pplic a tio ns
s u ch a s K aggle . H e is p assio nate
about h elp in g p eople to d eve lo p d ata -
d riv e n s o lu tio ns.
Dis cu ssio n t h em es: P yth on f o r A I/m ach in e le arn in g, v 2.7 /v 3.x .
Catc h u p w it h S eb astia n R asch ka h ere : @ ra sb t
M ik e D ris co ll
: C ould yo u giv e a lit tle backg ro und in fo rm atio n about
y o urs e lf ?
S eb astia n R asch ka
: O f co urs e ! M y
nam e pro bably alr e ady giv e s it
a w ay, b ut I w as b orn a nd r a is e d in G erm any, w here
I liv e d fo r m ore th an
t w o d eca des, u ntil I h ad th e u rg e to g o o n a n a dve ntu re a nd
stu dy in th e
U S.

I re ce iv e d m y u nderg ra duate d egre e fr o m H ein ric h -H ein e U niv e rs it y in
Düsse ld orf. I
re m em ber o ne d ay w alk in g to th e c a fe te ria a nd s tu m blin g
upon a fly e r re gard in g a stu dy
abro ad pro gra m w it h M ic h ig an S ta te
Univ e rs it y (M SU ). I w as s u per in tr ig ued a nd th ought
th at th is m ig ht b e a
worth w hile e xp erie nce . S o n ot lo ng a fte r th at, I s tu die d fo r
tw o y e ars a t
MSU a nd r e ce iv e d a B ach elo r P lu s/In te rn atio nal d egre e.
Durin g th ose tw o
se m este rs , I m ade m any fr ie nds a t M SU a nd th ought
th at th e s cie ntif ic e nvir o nm ent
would p ro vid e a n e xce lle nt o pportu nit y fo r
me to g ro w a s a s cie ntis t, w hic h is w hy
I a pplie d fo r g ra d s ch ool a t M SU .
I s h ould s a y th at th is c h apte r o f m y lif e c a m e w it h
a h appy e ndin g, a s I
obta in ed m y P h.D . in D ece m ber 2 017. S o th at's m y a ca dem ic c a re er.
Seb astia n R asch ka: 'D urin g m y t im e a s a g ra d uate s tu den t, I g ot
heavily in vo lv ed in
open s o urc e in t h e c o nte xt o f d ata s cie n ce a n d
mach in e le arn in g.'
Durin g m y tim e a s a g ra duate s tu dent, I g ot h eavily in vo lv e d in o pen
so urc e in th e
co nte xt o f d ata s cie nce a nd m ach in e le arn in g. A ls o , I a m a
passio nate b lo gger a nd
writ e r. S om e p eople m ay h ave s tu m ble d u pon
my b ook,
Pyth on M ach in e L earn in g
, w hic h w as ve ry w ell- re ce iv e d b y
both p eople fr o m a ca dem ia a nd th e in dustr y .
Wit h m y b ook, I tr ie d to b rid ge th e g ap b etw een p ure ly p ra ctic a l (th at is ,
co din g)
books a nd p ure ly th eore tic a l (i. e ., m ath -h eavy) w ork s. B ase d o n
all o f th e fe edback
th at I r e ce iv e d,
Pyth on M ach in e L earn in g
tu rn ed o ut to
be s u per u se fu l to a b ro ad a udie nce . T he b ook w as tr a nsla te d in to s e ve n
la nguages a nd is c u rre ntly u se d a s a te xtb ook a t th e L oyo la U niv e rs it y
Chic a go, th e
Univ e rs it y o f O xfo rd , a nd m any o th ers .
Dris co ll
: D o y o u c o ntr ib ute to a ny
open s o urc e p ro je cts ?
Rasch ka
: Y es, b esid es m y w rit in gs, I a m c o ntr ib utin g to o pen s o urc e
pro je cts s u ch a s s cik it - le arn ,
Te nso rF lo w a nd P yTo rc h . I a ls o h ave m y
ow n lit tle o pen s o urc e p ro je cts th at I w ork
on in m y fr e e tim e, in clu din g
mlx te nd a nd B io P andas.
mlx te nd
is a P yth on lib ra ry w it h u se fu l to ols fo r th e d ay-to -d ay d ata

scie nce ta sks. It a im s
to fill th e g ap in th e P yth on d ata s cie nce s yste m , b y
pro vid in g to ols th at a re n ot
ye t a va ila ble in o th er p acka ges. F or e xa m ple ,
th e s ta ckin g c la ssif ie rs a nd re gre sso rs ,
as w ell a s th e s e quentia l fe atu re
se le ctio n a lg orit h m s, a re v e ry p opula r in th e K aggle
co m munit y .
In a ddit io n, th e fr e quent p atte rn m in in g a lg orit h m s, in clu din g A prio ri a nd
alg orit h m s
fo r d eriv in g a sso cia tio n r u le s, a re s u per h andy. M ost r e ce ntly , I
added a lo t o f n on-p ara m etr ic
fu nctio ns, fo r e va lu atin g m ach in e le arn in g
cla ssif ie rs fr o m b oots tr a ppin g, to M cN em ar's
te sts .
Seb astia n R asch ka: 'T o s ta y m ost p ro ductiv e, I d id n't w an t t o le arn
a w hole n ew A PI
fo r e ach lit tle s id e p ro je ct.'
The B io P andas pro je ct
aro se fr o m
th e need to w ork w it h m ole cu la r
str u ctu re s fr o m d if f e re nt file fo rm ats m ore c o nve nie ntly .
Durin g m y P h.D .,
many p ro je cts in vo lv e d w ork in g w it h p ro te in s tr u ctu re s, o r s tr u ctu re s
of
sm all (d ru g-lik e ) m ole cu le s. T here a re m any to ols o ut th ere fo r th at, b ut
each
has it s o w n lit tle s u bla nguage. T o s ta y m ost p ro ductiv e , I d id n't w ant
to le arn a
whole n ew A PI fo r e ach lit tle s id e p ro je ct.
The id ea behin d B io P andas is to pars e str u ctu ra l file s in to pandas
Data F ra m es, a lib ra ry
and fo rm at th at m ost d ata s cie ntis ts a re a lr e ady
fa m ilia r w it h . O nce th e s tr u ctu re s
are in a D ata F ra m e fo rm at, w e c a n u se
all o f th e p ow er o f p andas th at is a t o ur d is p osa l,
in clu din g it s s u per
fle xib le s e le ctio n s yn ta x.
A vir tu al scre enin g to ol th at I re ce ntly d eve lo ped, scre enla m p, m ake s
heavy u se o f
Bio P andas a s it s c o re e ngin e. I c o uld s cre en d ata base s
wit h m ore th an 12 m illio n m ole cu le s
eff ic ie ntly , whic h le d to th e
su cce ssfu l dis co ve ry of pote nt G pro te in -c o uple d re ce pto r
sig nalin g
in hib it o rs , wit h applic a tio ns to aquatic in va siv e sp ecie s co ntr o l, in
co lla bora tio n
wit h e xp erim enta l b io lo gis ts a t M SU .
Seb astia n R asch ka: 'S em i- a d vers aria l n etw ork s a re a d eep le arn in g
arc h it e ctu re t h at
I d evelo ped w it h m y c o lla b ora to rs in t h e iP R oB e
Lab a t M SU .'

Besid es a ll o f m y in vo lv e m ent in c o m puta tio nal b io lo gy, o ne o f m y o th er
passio n p ro je cts
in vo lv e s se m i- a dve rs a ria l netw ork s. S em i- a dve rs a ria l
netw ork s are a deep le arn in g
arc h it e ctu re th at I deve lo ped w it h m y
co lla bora to rs in th e iP R oB e L ab a t M SU , w hic h
we s u cce ssfu lly a pplie d
in th e c o nte xt o f p riv a cy c o nce rn s in th e fie ld o f b io m etr ic s.
In p artic u la r, w e a pplie d th is a rc h it e ctu re to p ertu rb fa ce im ages in s u ch a
way th at
th ey lo oke d a lm ost id entic a l to th e o rig in al in put im ages, w hile
so ft b io m etr ic a ttr ib ute s,
su ch a s g ender, w ere in acce ssib le b y g ender
pre dic to rs . T he o ve ra ll g oal is to p re ve nt
nasty th in gs lik e p ro filin g, b ase d
on s o ft b io m etr ic a ttr ib ute s, w it h out a u se r's
co nse nt.
Dris co ll
: S o w hy d id y o u b eco m e a p ro gra m mer?
Rasch ka
: I w ould sa y th at th e p rim ary d riv in g fa cto r fo r b eco m in g a
pro gra m mer w as to b e
able to im ple m ent m y 'c ra zy' r e se arc h id eas.
In c o m puta tio nal b io lo gy, w e a lr e ady h ave m any to ols a t o ur d is p osa l th at
we ca n u se
wit h out th e need to pro gra m ours e lv e s. H ow eve r, usin g
exis tin g to ols ( d ependin g o n
th e r e se arc h ta sk) c a n a ls o b e a b it lim it in g.
If w e w ant to tr y s o m eth in g n ew , e sp ecia lly
if w e w ant to d eve lo p n ew
meth ods, th en th ere is n o w ay a ro und le arn in g h ow to p ro gra m .
Lik e m ost p eople , I s ta rte d w it h s im ple B ash s crip tin g in a L in ux s h ell. A t
so m e p oin t,
I re aliz e d th at th is w asn 't quit e enough, or not eff ic ie nt
enough. Durin g m y underg ra duate
stu die s in Germ any, I to ok a
bio in fo rm atic s c la ss in P erl.
When I s a w w hat w as p ossib le w it h P erl, th is w as q uit e a n e ye -o penin g
exp erie nce .
Late r, when I was co nductin g sta tis tic a l analy se s and
pre parin g d ata v is u aliz a tio ns
base d o n th e d ata th at I c o lle cte d, I a ls o g ot
in to R . N ot lo ng a fte r th at, I g ot
in to P yth on.
Dris co ll
: W hy P yth on?
Rasch ka
: W ell, I
mentio ned th at I s ta rte d w it h P erl a nd R . H ow eve r, o ne
th in g th at m ost p ro gra m mers
have in co m mon is th at w e co nsu lt th e
in te rn et o n a re gula r b asis to lo ok fo r u se fu l
poin te rs , a nd o th er tip s a nd
tr ic ks fo r a ch ie vin g c e rta in s u bta sks.

Seb astia n R asch ka: 'I s tu m ble d u pon m an y d if f e re n t r e so urc es t h at
were w rit te n in
Pyth on a n d I t h ought t h at it w ould b e w orth w hile
le arn in g t h is la n guag e.'
Suff ic e it to sa y, I stu m ble d u pon m any d if f e re nt re so urc e s th at w ere
writ te n in P yth on
and I th ought th at it w ould b e w orth w hile le arn in g th is
la nguage. A t s o m e p oin t, I
move d a w ay fr o m P erl e ntir e ly a nd d id a ll o f
my co din g in P yth on: cu sto m scrip ts fo r
data co lle ctio n, p ars in g a nd
analy sis .
I a ls o h ave to m entio n th at I d id a ll o f th e s ta tis tic a l a naly se s a nd p lo ttin g
in
R. A ctu ally , n ot to o lo ng a go, w hen I w as re vis it in g a n o ld p ro je ct, I
stu m ble d upon
my old F ra nke nste in -e sq ue scrip ts (B ash scrip ts and
make file s), w hic h w ere r u nnin g
Pyth on a nd R in ta ndem .
Now , b ack in 2 012, w hen th e scie ntif ic co m putin g sta ck w as g ro w in g
quic kly , I stu m ble d
upon N um Py, S ciP y, m atp lo tlib and scik it - le arn . I
re aliz e d th at e ve ry th in g th at I
did in R , I c o uld a ls o d o in P yth on. I c o uld
avo id s w it c h in g b ack a nd fo rth b etw een
la nguages in m y p ro je cts .
Seb astia n R asch ka: 'I r e ally e n jo y b ein g p art o f a n d in te ra ctin g w it h
th e v iv id P yth on
co m munit y .'
Lookin g b ack, p ic kin g u p
Pyth on w as p ro bably o ne o f th e b est d ecis io ns
th at I m ade. W it h out P yth on, it w ould n't
have b een p ossib le fo r m e to b e
so p ro ductiv e . B ut b esid es r e se arc h a nd w ork , I r e ally
enjo y b ein g p art o f
and in te ra ctin g w it h th e v iv id P yth on c o m munit y . W heth er I a m
in te ra ctin g
wit h p eople v ia T w it te r, o r m eetin g p eople a t c o nfe re nce s lik e P yD ata
and
SciP y, it 's a lw ays a fu n e xp erie nce .
Dris co ll
: P yth on is o ne o f th e la nguages th at is b ein g u se d in A I a nd
mach in e le arn in g r ig ht
now . C ould y o u e xp la in
what m ake s it s o p opula r?
Rasch ka
: I th in k th ere a re
tw o m ain r e aso ns, w hic h a re v e ry r e la te d. T he
fir s t r e aso n is th at P yth on is s u per
easy to r e ad a nd le arn .
I w ould a rg ue th at m ost p eople w ork in g in m ach in e le arn in g a nd A I w ant

to fo cu s o n
tr y in g o ut th eir id eas in th e m ost c o nve nie nt w ay p ossib le .
The fo cu s is o n r e se arc h
and a pplic a tio ns, a nd p ro gra m min g is ju st a to ol
to g et y o u th ere . T he m ore c o m fo rta ble
a p ro gra m min g la nguage is to
le arn , th e lo w er th e e ntr y b arrie r is fo r m ore m ath a nd
sta ts -o rie nte d
people .
Seb astia n R asch ka: 'I w ould a rg ue t h at m ost p eo ple w ork in g in
mach in e le arn in g a n d
AI w an t t o f o cu s o n t r y in g o ut t h eir id eas in
th e m ost c o nven ie n t w ay p ossib le .'
Pyth on is a ls o s u per re adable , w hic h h elp s w it h k e epin g u p-to -d ate w it h
th e s ta tu s
quo in m ach in e le arn in g a nd A I, fo r e xa m ple , w hen re adin g
th ro ugh c o de im ple m enta tio ns
of a lg orit h m s a nd id eas. T ry in g n ew id eas
in AI and m ach in e le arn in g ofte n re quir e s
im ple m entin g re la tiv e ly
so phis tic a te d alg orit h m s and th e m ore tr a nsp are nt th e la nguage,
th e
easie r it is to d ebug.
The se co nd m ain re aso n is th at w hile P yth on is a ve ry acce ssib le
la nguage it s e lf ,
we h ave a lo t o f g re at lib ra rie s o n to p o f it th at m ake o ur
work e asie r. N obody w ould
lik e to s p end th eir tim e o n re im ple m entin g
basic a lg orit h m s fr o m s cra tc h ( e xce pt in
th e c o nte xt o f s tu dyin g m ach in e
le arn in g a nd A I) . T he la rg e n um ber o f P yth on lib ra rie s
whic h e xis t h elp u s
to fo cu s o n m ore e xcit in g th in gs th an r e in ve ntin g th e w heel.
Seb astia n R asch ka: 'T he la rg e n um ber o f P yth on lib ra rie s w hic h
exis t, h elp u s t o f o cu s
on m ore e xcit in g t h in gs t h an r e in ven tin g t h e
wheel.'
By th e w ay, P yth on is a ls o a n
e xce lle nt w ra pper la nguage fo r w ork in g
wit h more eff ic ie nt C/C ++ im ple m enta tio ns
of alg orit h m s and
CUDA/c u D NN, w hic h is w hy e xis tin g m ach in e le arn in g a nd d eep le arn in g
lib ra rie s r u n e ff ic ie ntly in P yth on. T his is a ls o s u per im porta nt fo r w ork in g
in th e
fie ld s o f m ach in e le arn in g a nd A I.
To su m mariz e , I w ould sa y th at P yth on is a g re at la nguage th at le ts
re se arc h ers a nd
pra ctit io ners fo cu s on m ach in e le arn in g and A I and

pro vid es le ss o f a d is tr a ctio n
th an o th er la nguages.
Dris co ll
: W ere th ere a ny m om ents w here th in gs m ay h ave g one a noth er
way, b ut s u rre ptit io usly
ended u p th e w ay th at th ey d id ?
Rasch ka
: T hat's a good questio n. M ayb e th e fa ct th at P yth on w as
popula r a m ong th e L in ux c o m munit y ,
but w ork e d v e ry w ell o n W in dow s
as w ell. T his w as lik e ly a b ig c o ntr ib uto r to P yth on
beco m in g s o p opula r
to day.
There a re re la tiv e ly s im ila r la nguages o ut th ere lik e R uby. T he R uby o n
Rails p ro je ct
was ( a nd s till is ) s u per p opula r. If p ro je cts lik e D ja ngo h ad n't
sta rte d, P yth on m ig ht
have b eco m e le ss p opula r a s a n a ll- ro under, w hic h
may h ave le d to fe w er re so urc e s
and o pen s o urc e c o ntr ib utio ns b ein g
devo te d to deve lo pin g P yth on. In tu rn , P yth on
may have been le ss
popula r a s a la nguage fo r m ach in e le arn in g a nd A I.
Seb astia n R asch ka: 'I f T ra vis O lip han t h ad n't s ta rte d t h e N um Py
pro je ct...I t h in k
fe w er s cie n tis ts w ould h ave p ic ked u p P yth on a s a
scie n tif ic p ro gra m min g la n guag e.'
If T ra vis O lip hant h adn't s ta rte d th e N um Py p ro je ct ( it w as c a lle d N um eric
back th en
in 1 995), I th in k fe w er s cie ntis ts w ould h ave p ic ke d u p P yth on
as a s cie ntif ic p ro gra m min g
la nguage e arly in th eir c a re ers . W e w ould a ll
still b e u sin g M AT LA B.
Dris co ll
: S o is P yth on ju st th e rig ht to ol
at th e rig ht tim e, o r is th ere
anoth er r e aso n th at it 's b eco m e s o im porta nt in A I a nd m ach in e le arn in g?
Rasch ka
: I th in k th at's a b it o f a c h ic ke n o r th e e gg p ro ble m .
To u nta ngle it , I w ould s a y th at P yth on is c o nve nie nt to u se , w hic h le d to
it s w id e
adoptio n. T he c o m munit y h as d eve lo ped m any u se fu l p acka ges
in th e co nte xt o f scie ntif ic
co m putin g. M any m ach in e le arn in g a nd A I
deve lo pers pre fe r Pyth on as a genera l pro gra m min g
la nguage fo r
scie ntif ic c o m putin g, a nd th ey h ave d eve lo ped lib ra rie s o n to p o f it ,
lik e
Theano, M XN et, T e nso rF lo w a nd P yTo rc h .

On a n in te re stin g s id e n ote , h avin g
been a ctiv e in th e m ach in e le arn in g
and d eep le arn in g
c o m munit ie s, th ere w as o ne th in g th at I h eard v e ry
ofte n: "T he T o rc h lib ra ry is a w eso m e,
but it is w rit te n in L ua, a nd I d on't
want to s p end m y tim e le arn in g y e t a noth er la nguage."
Note th at w e h ave
PyTo rc h n ow .
Mik e D ris co ll: D o y o u t h in k t h is o pen s t h e d oor f o r a n y P yth on
pro gra m mer t o s ta rt
exp erim en tin g w it h A I?
Rasch ka
: I d o th in k s o ! It d epends o n h ow w e in te rp re t A I, b ut r e gard in g
deep le arn in g a nd
re in fo rc e m ent le arn in g, th ere a re m any co nve nie nt
packa ges
w it h P yth on w ra ppers o ut th ere .
Pro bably th e m ost p opula r e xa m ple a t th e m om ent w ould b e T e nso rF lo w .
Pers o nally , I
use b oth T e nso rF lo w a nd P yTo rc h in m y c u rre nt re se arc h
pro je cts . I h ave b een u sin g
Te nso rF lo w s in ce it w as r e le ase d in 2 015 a nd
lik e it o ve ra ll. H ow eve r, it is a b it
le ss fle xib le w hen tr y in g o ut u nusu al
re se arc h id eas, w hic h is w hy I re ce ntly g ot
more in to P yTo rc h . P yTo rc h
it s e lf is m ore fle xib le a nd it s s yn ta x is c lo se r to P yth on;
in fa ct, P yTo rc h
describ es it s e lf a s " a d eep le arn in g fr a m ew ork th at p uts P yth on fir s t."
Dris co ll
: W hat c o uld b e d one to m ake
Pyth on a b ette r la nguage fo r A I
and m ach in e
le arn in g?
Rasch ka
: W hile P yth on is a la nguage th at is v e ry c o nve nie nt to u se a nd
nic e ly in te rfa ce s
wit h C /C ++ c o de, w e h ave to k e ep in m in d th at it is n ot
th e m ost e ff ic ie nt la nguage.
Com puta tio nal e ff ic ie ncy is w hy C /C ++ is s till th e p ro gra m min g la nguage
of c h oic e
fo r s e ve ra l m ach in e le arn in g a nd A I d eve lo pers . A ls o , P yth on is
not s u pporte d o n m ost
mobile a nd e m bedded d evic e s. H ere w e h ave to
dis tin guis h b etw een r e se arc h , d eve lo pm ent
and p ro ductio n.
Seb astia n R asch ka: 'T he c o nven ie n ce o f P yth on c o m es a t a p ric e,
whic h is p erfo rm an ce.'

The c o nve nie nce o f P yth on
co m es a t a p ric e , w hic h is p erfo rm ance . O n
th e
oth er h and, s p eed a nd c o m puta tio nal e ff ic ie ncy c o m es w it h a tr a de-
off in te rm s o f
pro ductiv it y . In p ra ctic e , I th in k th at it 's u su ally b est to s p lit
ta sks w hen w ork in g
in a te am , fo r in sta nce , h avin g p eople w ho s p ecia liz e
in re se arc h a nd tr y in g n ew id eas,
and p eople w ho s p ecia liz e in ta kin g
pro to ty p es to p ro ductio n.
I a m m ain ly a r e se arc h er a nd h ave n't r u n in to th is p ro ble m y e t, b ut I h ave
als o h eard
th at P yth on is n ot g ood fo r p ro ductio n. I th in k th is is m ain ly
due to e xis tin g in fr a str u ctu re ,
how eve r, a nd th e to ols th at a re s u pporte d
by th e s e rv e rs , s o it 's n ot r e ally P yth on's
fa ult p er s e .
Seb astia n R asch ka: 'P yth on d oesn 't s cale a s w ell a s o th er
la n guag es s u ch a s J ava o r
C++.'
In genera l, due to it s natu re as a hig h-le ve l and genera l- p urp ose
pro gra m min g la nguage,
Pyth on d oesn 't s ca le a s w ell a s o th er la nguages
su ch as Ja va or C ++, alt h ough th ey
are m ore te dio us to use . F or
in sta nce , s p endin g to o m uch tim e in th e P yth on ru ntim e,
when w ork in g
wit h T e nso rF lo w , c a n b e a re al p erfo rm ance k ille r. Im pro vin g th e g enera l
eff ic ie ncy o f P yth on (I d on't th in k th is is re ally p ossib le th ough w hile
ke epin g P yth on
as co nve nie nt a s it is ) w ould b e b enefic ia l to A I a nd
mach in e le arn in g.
Seb astia n R asch ka: 'I m pro vin g t h e g en era l e ff ic ie n cy o f
Pyth on...w ould b e b en efic ia l
to A I a n d m ach in e le arn in g.'
While P yth on p ro vid es a g re at e nvir o nm ent fo r ra pid p ro to ty p in g, it is
so m etim es a
lit tle b it to o fo rg iv in g a nd d yn am ic ty p es a llo w y o u to m ake
mis ta ke s m ore e asily .
I th in k th e re ce nt in tr o ductio n o f ty p e h in ts m ay
help to im pro ve th is is su e to so m e
exte nt. A ls o , ke epin g ty p e hin ts
optio nal is a g re at id ea, b eca use w hile it h elp s
wit h la rg er c o de b ase s, it
ca n a ls o b e a n a nnoya nce fo r s m alle r c o din g p ro je cts .
Dris co ll
: W hat a re y o u m ost e xcit e d a bout in P yth on to day?

Rasch ka
: I a m s u per e xcit e d th at I
ca n d o a nyth in g th at I n eed in P yth on.
I c a n s p end m y tim e e ff ic ie ntly o n re se arc h
and p ro ble m s o lv in g, w it h out
th e n eed to s p end m ost o f m y d ays le arn in g n ew to ols
and p ro gra m min g
la nguages.
Seb astia n R asch ka: 'I a m s u per h ap py w it h t h e s ta tu s q uo o f
Pyth on. I a m e xcit e d a b out
th e c o ntin ued d evelo pm en t o f t h e
fu ndam en ta l d ata s cie n ce lib ra rie s lik e N um Py.'
Sure , s o m etim es it 's g ood to
lo ok b eyo nd th e P yth on e co syste m , to s e e
what's o ut th ere a nd w hat c o uld p ote ntia lly
be u se fu l. H ow eve r, o ve ra ll, I
am s u per h appy w it h th e s ta tu s q uo o f P yth on. I a m
excit e d a bout th e
co ntin ued d eve lo pm ent o f th e fu ndam enta l d ata scie nce lib ra rie s
lik e
Num Py, w hic h r e ce iv e d a la rg e g ra nt fr o m th e M oore F oundatio n to fo cu s
on im pro vin g
th e lib ra ry e ve n fu rth er.
Als o , I r e ce ntly s a w a c o nfe re nce ta lk o n th e r e desig n o f p andas, p andas
2, w hic h
will m ake th is a lr e ady g re at lib ra ry e ve n m ore e ff ic ie nt, w it h out
ch angin g th e u se r
in te rfa ce .
The o ne th in g I a m p ro bably m ost e xcit e d a bout, th ough, is th e g re at
co m munit y a ro und
Pyth on. It's g re at to fe el p art o f th e P yth on c o m munit y
and to b e in th e s a m e b oat
re gard in g a dva ncin g th e la ndsca pe o f to ols
and s cie nce . I c a n s h are k n ow le dge, le arn
fr o m o th ers a nd s h are m y
excit e m ent w it h lik e m in ded p eople .
Seb astia n R asch ka: 'I t 's g re at t o f e el p art o f t h e P yth on c o m munit y
an d t o b e in t h e
sam e b oat r e g ard in g a d van cin g t h e la n dscap e o f
to ols a n d s cie n ce.'
Dris co ll
: W hat d o y o u th in k a bout th e
lo ng lif e o f P yth on 2 .7 ? S hould
people m ove o ve r?
Rasch ka
: T hat's a g ood q uestio n. P ers o nally , I a lw ays r e co m mend u sin g
th e la te st v e rs io n
of P yth on. H ow eve r, I a ls o r e aliz e th at th is is n ot a lw ays
possib le fo r e ve ry o ne.

If y o ur p ro je ct in vo lv e s w ork in g o n o r w it h a n o ld er P yth on 2 .7 c o de b ase ,
th en it
may n ot b e fe asib le to m ake th e s w it c h in te rm s o f re so urc e s.
Regard in g th e lo ng lif e
of P yth on 2 .7 , w e a ll k n ow th at P yth on 2 .7 w ill n ot
be o ff ic ia lly m ain ta in ed a fte r
2020. O ne th in g th at m ig ht h appen is th at a
su bco m munit y w ill ta ke o ve r th e m ain te nance
of P yth on 2 .7 .
Seb astia n R asch ka: 'O ne t h in g t h at m ig ht h ap pen is t h at a
su bco m munit y w ill t a ke o ver
th e m ain te n an ce o f P yth on 2 .7 .'
I a ls o w onder w heth er it w ould b e w orth w hile to s p end th e e nerg y a nd
re so urc e s m ain ta in in g
Pyth on 2 .7 a fte r 2 020 a s a s id e p ro je ct, v e rs u s
ta kin g th e tim e to p ort P yth on 2 .7
co de b ase s o ve r to P yth on 3 .x . T he
lo ng-te rm m ain te nance o f P yth on 2 .7 w ill a lw ays
re m ain u nce rta in .
Pers o nally , I a lw ays in sta ll th e
la te st v e rs io n o f P yth on w hen it c o m es o ut
and d o a ll o f m y c o din g in P yth on 3 . H ow eve r,
most o f m y p ro je cts a ls o
su pport P yth on 2 .7 . T he re aso n is th at th ere a re s till m any
people u sin g
Pyth on 2 .7 w ho c a nnot s w it c h , a nd I d on't w ant to e xclu de a nyo ne. S o
if
it d oes n ot re quir e a ny m ajo r h assle o r c lu nky w ork a ro unds, th en I w rit e
my c o de
in a w ay th at is c o m patib le w it h b oth P yth on 2 .7 a nd 3 .x .
Seb astia n R asch ka: 'T here a re s till m an y p eo ple u sin g P yth on 2 .7
who c an not s w it c h
an d I d on't w an t t o e xclu de a n yo ne.'
Dris co ll
: W hat c h anges w ould y o u lik e to s e e in
fu tu re P yth on r e le ase s?
Rasch ka
: M y a polo gie s, b ut m y a nsw er is a r a th er b orin g o ne: I a m q uit e
happy w it h P yth on's
cu rre nt se t of fe atu re s and don't have anyth in g
sig nif ic a nt o n m y w is h lis t.
One th in g th at I a nd m ult ip le o th er p eople a re s o m etim es c o m pla in in g
about is P yth on's
Glo bal In te rp re te r L ock (G IL ). H ow eve r, fo r m y n eeds,
it 's ty p ic a lly n ot a n is su e.
For in sta nce , I lik e c o ntr o l o ve r w hen to d o
mult it h re adin g o r m ult ip ro ce ssin g.
I w ro te m y lit tle m ult ip ro ce ssin g w ra ppers (in th e m putil p acka ge) to

eva lu ate Pyth on
genera to rs la zily , w hic h w as an is su e co nce rn in g
mem ory c o nsu m ptio n w hen I w as w ork in g
wit h v a nilla
Pool
c la sse s fr o m
Pyth on's m ult ip ro ce ssin g sta ndard lib ra ry . Besid es, th ere are gre at
lib ra rie s o ut th ere , lik e jo blib , w hic h m ake m ult ip ro ce ssin g a nd th re adin g
su per c o nve nie nt.
On to p o f th at, m ost lib ra rie s th at I u se fo r th e h eavy lif tin g w hen it c o m es
to doin g
co m puta tio ns in para lle l (D ask, Te nso rF lo w , and PyTo rc h )
alr e ady su pport m ult ip ro ce ssin g
and use Pyth on m ore as a glu e
la nguage a s I m entio ned e arlie r, s o th at c o m puta tio nal
eff ic ie ncy is n eve r
re ally a n is su e.
Dris co ll
: T hank y o u, S ebastia n R asch ka .

C hap te r 1 3. W esle y C hun
W esle y C hun
is an A m eric a n so ftw are engin eer w ho has w ork e d at
G oogle fo r th e past eig ht ye ars .
In his ro le as a se nio r de ve lo per
a dvo ca te , W esle y e nco ura ges d eve lo pers to a dopt
Google to ols and
A PIs . H e pre vio usly w ork e d fo r Y ahoo! and w as one of th e orig in al
Y ahoo! M ail engin eers . W esle y is a fe llo w of th e P yth on S oftw are
F oundatio n (P SF)
and ru ns C yb erW eb C onsu lt in g, w hic h s p ecia liz e s in
P yth on tr a in in g a nd te ch nic a l c o urs e s.
He is th e b ests e llin g a uth or o f th e
C ore P yth on P ro gra m min g
b ook se rie s a nd co -a uth ore d
Pyth on W eb
D eve lo pm ent w it h D ja ngo
. W esle y h as a ls o c o ntr ib ute d to L in ux J o urn al,
C NET, a nd In fo rm IT .
Dis cu ssio n t h em es: Y ah oo! M ail, P yth on b ooks, v 2.7 /v 3.x .
Catc h u p w it h W esle y C hun h ere : @ wescp y
M ik e D ris co ll
: S o w hy d id y o u b eco m e a
pro gra m mer?
W esle y C hun
: I'v e b een fa scin ate d b y th e a bilit y to w rit e c o de to s o lv e
p ro ble m s fo r a lo ng tim e
now . M y in te re st p ro bably s ta rte d d urin g th e
l a tte r y e ars o f h ig h s ch ool.
M y p ro gra m min g te ach er sh ow ed u s h ow to w rit e co de im ple m entin g
G auss-J o rd an elim in atio n
and have a co m pute r so lv e syste m s of

equatio ns a uto m atic a lly . T his d em onstr a te d h ow
co de c o uld b e u se d to
auto m ate te dio us w ork th at p re vio usly re quir e d in eff ic ie nt h um an
pow er
to c o m pute .
While w e w ere o nly u sin g C om modore B ASIC , b ein g a ble to im ple m ent
th at a lg orit h m a nd
watc h it w ork s u cce ssfu lly , w as o ne o f th e fa cto rs th at
motiv a te d m e to b eco m e a p ro fe ssio nal
deve lo per. W antin g to m ake
people a nd p ro ce sse s m ore e ff ic ie nt h as le d to m y m ult i- d eca de
ca re er
as a
so ftw are e ngin eer.
Wesle y C hun: 'W an tin g t o m ake p eo ple a n d p ro cesses m ore
eff ic ie n t h as le d t o m y m ult i- d ecad e
care er a s a s o ftw are e n gin eer.'
Dris co ll
: So how did yo u co m e acro ss th e
Pyth on pro gra m min g
la nguage?
Chun
: F in din g P yth on w as n ot b y c h oic e . I h ad e xp erie nce w it h C /C ++
pro gra m min g, a s w ell
as p opula r s h ell la nguages s u ch a s T c l a nd P erl.
Then I b egan w ork in g a t a s ta rt- u p
co m pany w here P yth on b eca m e th e
prim ary d eve lo pm ent la nguage. I le arn ed P yth on a nd
help ed to b uild
what w as e ve ntu ally to b eco m e Y ahoo! M ail in th e la te 1 990s.
Dris co ll
: H ow w as Y ahoo! M ail c re ate d?
Chun
: In 1 997, I w as w ork in g a t a s ta rt- u p
c a lle d F our1 1 . T ru e to it s
nam e, th e fir s t p ro duct re le ase d b y th e c o m pany w as o ne
of th e fir s t
onlin e v e rs io ns o f th e te le phone w hit e p ages d ir e cto rie s.
The F our1 1 s e rv ic e , w hile b ein g a w eb a pp, w as w rit te n e ntir e ly in C ++, a
monolit h ic
bin ary th at w as burd enso m e to build and cu m bers o m e to
main ta in . T he C TO a nd c o -fo under
began to lo ok fo r a w ay to d eve lo p
more n im bly .
Afte r re se arc h in g a v a rie ty o f s crip tin g la nguages, th e C TO d is co ve re d
th at if y o u
le ft a ll o f th e h ard co re w ork a s C ++, P yth on w as a la nguage
th at y o u c o uld d ro p in
as th e fr o nt- e nd, a s w ell a s r e pla ce th e m id dle w are
wit h .

Our n ext p ro duct, R ocke tM ail, w as d eve lo ped
w it h th is m odif ie d s ta ck.
We c re ate d o ur o w n w eb fr a m ew ork b efo re th at te rm e ve n
exis te d. U sin g
th is fr a m ew ork , o ur co re te am w as a ble to la unch a su cce ssfu l m ail
se rv ic e , w hic h ca use d Yahoo! to acq uir e our co m pany. R ocke tM ail
beca m e Y ahoo! M ail
and th e r e st is h is to ry .
Dris co ll
: S o h ow d id y o u e nd u p
beco m in g a n a uth or?
Chun
: B eco m in g an auth or w as als o accid enta l. D urin g one of m y
su m mer in te rn sh ip s a t c o lle ge,
I w as g iv e n th e ta sk o f w rit in g a u se r
manual fo r c u sto m ers .
I le arn ed h ow to w rit e u sin g V entu ra P ublis h er a nd w it h th at e xp erie nce
under m y b elt ,
my c o din g a nd w rit in g h ave b een p air e d to geth er e ve r
sin ce .
Wesle y C hun: 'W hen I w as e xp osed t o P yth on in t h e w ork fo rc e,
th ere w ere o nly t w o P yth on
books o n t h e m ark et.'
When I w as e xp ose d to P yth on in th e w ork fo rc e , th ere w ere o nly tw o
Pyth on b ooks o n
th e m ark e t. O ne w as a la rg e c a se s tu dy b ook, w hile th e
oth er w as th e fir s t P yth on
book, w hic h w as a lr e ady s o m ew hat o utd ate d.
The need fo r a book about Pyth on, fo r deve lo pers
co m in g fr o m
la nguages lik e C a nd s h ell s crip ts , d ro ve m e to c ra ft th e fir s t
Core P yth on
Pro gra m min g
b ook.
Dris co ll
: W hat h ave y o u le arn ed fr o m
writ in g P yth on b ooks?
Chun
: If I w asn 't a lr e ady a d eve lo per, th en I c o uld p ro bably s a y th at I
le arn ed P yth on
fr o m w rit in g b ooks. A ny tim e th at y o u w rit e a b ook, y o u
need to d o s o m e r e se arc h in to
th e s u bje ct m atte r.
You sh ould le arn m ore in fo rm atio n about yo ur su bje ct th an is re ally
nece ssa ry . In
ord er to ta ke a th oro ugh lo ok a t a p ro gra m min g la nguage,
yo u m ust b eco m e fa m ilia r
wit h b oth c o m monly -u se d fe atu re s a nd c o rn er
ca se s.
Dris co ll
:
How h ave y o ur r e aders im pacte d y o ur w rit in g?

Chun
: H avin g r e aders
co m e u p to m e a nd le t m e k n ow th at I w as o ne o f
th eir p rim ary s o urc e s fo r le arn in g
Pyth on, a lw ays b rin gs a s m ile to m y
fa ce .
Wesle y C hun: 'R ead ers c o m e u p t o m e a n d le t m e k n ow t h at I w as
one o f t h eir p rim ary
so urc es f o r le arn in g P yth on.'
Wheneve r p ossib le , I a sk fo r d ir e ct fe edback fr o m m y re aders s o th at I
ca n m ake m y
books e ve n b ette r. R eaders lo ve th e e xe rc is e s a fte r a
ch apte r, w hic h h elp to re in fo rc e
what th ey le arn ed. T hey a ls o a ppre cia te
th e w id e v a rie ty o f to pic s c o ve re d.
Dris co ll
:
Could y o u e xp la in th e id ea b ehin d C yb erW eb C onsu lt in g?
Chun
: Yes, m y hom e busin ess is m eant to co nso lid ate all of th e
fr e ela nce w ork th at I perfo rm
fo r th e P yth on co m munit y . C yb erW eb
Consu lt in g
in co rp ora te s m agazin e a rtic le s, th e te ch nic a l P yth on tr a in in g
co urs e s th at I te ach
and o th er P yth on-re la te d c o nsu lt in g o pportu nit ie s
th at c o m e m y w ay.
Dris co ll
: W hat p ro je cts
a re y o u w ork in g o n n ow ?
Chun
: To th is d ay, I still h elp p eople to d is co ve r h ow m undane a nd
la borio us ta sks, w hic h
were o nce p erfo rm ed b y h um ans, c a n n ow b e
auto m ate d. T his fr e es p eople u p to h ave
hig her p urs u it s .
Wesle y C hun: 'I s till h elp p eo ple t o d is co ver h ow m undan e a n d
la b orio us t a sks, w hic h
were o nce p erfo rm ed b y h um an s, c an n ow
be a u to m ate d .'
I'm c u rre ntly a d eve lo per a dvo ca te a t G oogle . I s h ow d eve lo pers h ow to
in te gra te G oogle
te ch nolo gie s in to th eir a pps, w eb o r m obile . I s ta rte d b y
advo ca tin g G oogle C lo ud
Pla tfo rm p ro ducts , b ut h ave s in ce m ove d to th e
fa m ilia r G S uit e p ro ductiv it y a pplic a tio ns:
Gm ail, G oogle D riv e , C ale ndar,
Sheets , e tc .

While p eople a re fa m ilia r w it h th ese w ell- k n ow n a pps, I fo cu s o n te ach in g
pro gra m mers
about th e d eve lo per p la tfo rm s a nd
APIs b ehin d e ach o f
th ose to ols . Y ou'l l ofte n fin d m e on th e G S uit e D eve lo pers blo g
or
hostin g th e G S uit e D eve lo per S how (
http ://g oo.g l/ J p B Q 40
).
On th e P yth on s id e o f th e h ouse , I'm w ork in g o n th e th ir d e dit io n o f
Core
Pyth on P ro gra m min g
, w hic h w as m y fir s t b ook. R eaders fa m ilia r w it h
Core P yth on P ro gra m min g
w ill k n ow th at th e b ook is b ein g b ro ke n u p in to
tw o v o lu m es. T he th ir d p art o f th e
se co nd h alf ,
Core P yth on A pplic a tio ns
Pro gra m min g
, w as p ublis h ed b ack in 2 0 12. N ow I'm w rit in g th e th ir d
edit io n of th e fir s t half .
This la te st book w ill be ca lle d
Core P yth on
Language F undam enta ls
, to b ette r r e fle ct it s c o nte nt.
I als o have a Pyth on blo g, whic h I'v e honestly been negle ctin g.
Fortu nate ly fo r m e,
work h as p ro vid ed c o nte nt fo r th e b lo g b eca use a ny
of m y w ork o n G oogle d eve lo per
pro ducts fe atu re s a g ood d eal o f P yth on
co de.
Dris co ll
: W hat m ost e xcit e s y o u a bout
Pyth on a t th e m om ent?
Chun
: B elie ve it o r n ot, I'm m ost e xcit e d th at p eople e ve n k n ow w hat
Pyth on is to day.
Back in th e o ld d ays, n obody h ad e ve r h eard o f P yth on
befo re . P yth on w as s u ch a g re at
to ol, s o w e h oped th at th e w orld w ould
one d ay fin d o ut a bout it . I th in k w e'r e th ere
now .
Wesle y C hun: 'P yth on w as s u ch a g re at t o ol, s o w e h oped t h at t h e
world w ould o ne d ay
fin d o ut a b out it . I t h in k w e'r e t h ere n ow .'
I'm a ls o e xcit e d th at w e a re n ear th e e nd o f th e c ro ssro ads o f h avin g b oth
Pyth on
2 a nd 3 . P yth on 3 a doptio n h as ta ke n o ff a nd m ost p acka ges a re
now a va ila ble .
Dris co ll
: W hat d o y o u th in k a bout th e lo ng lif e
o f P yth on 2 ?
Chun
: S oon P yth on 2 w ill b e in th e re ar-v ie w m ir ro r. T hose w ho a re
ske ptic a l o f P yth on
3.x m ay re m ain th at w ay, b ut th at g ro up is s lo w ly
dis a ppearin g. P yth on m ovin g fr o m
2 to 3 is n ot th e s a m e a s m ovin g fr o m
Perl 5 to 6 .

The lo ng lif e o f P yth on 2 w as n ece ssa ry b eca use o f th e b ackw ard s
in co m patib ilit y of
Pyth on 3. H ow eve r, P yth on 2.6 and 2.7 are gre at
mig ra tio n to ols . T hey a re th e o nly
2.x v e rs io ns th at h ave 3 .x fe atu re s
backp orte d to th em , to h elp w it h th e o ve ra ll m ig ra tio n.
Wesle y C hun: 'I p ro cla im ed t h at it w ould t a ke a d ecad e f o r t h e w orld
to m ove t o P yth on
3, d ue t o it s la ck o f c o m patib ilit y w it h P yth on 2 .'
I h ave b een w rit in g a nd s p eakin g a bout th e lo ngevit y o f P yth on 2 fo r
so m e tim e. B ack
in 2 008, w hen 3 .0 la unch ed, I p ro cla im ed th at it w ould
ta ke a d eca de fo r th e w orld
to m ove to P yth on 3 , d ue to it s la ck o f
co m patib ilit y w it h P yth on 2 .
Base d o n th e m om entu m th at I'm s e ein g to day, I th in k th at I'm g oin g to
be m ore accu ra te
in m y pre dic tio n th an I th ought w as possib le . M y
orig in al sta te m ent w as m ostly a flip pant
and a bstr a ct o ne, w hic h h as
gra dually b eco m e m ore c o ncre te a nd re alis tic o ve r th e
past fe w y e ars .
But P yth on 3 .6 is a g re at v e rs io n to m ove o ve r to !
Wesle y C hun: 'I t h in k t h at I'm g oin g t o b e m ore a ccu ra te in m y
pre d ic tio n t h an I t h ought
was p ossib le .'
Dris co ll
: P yth on is b ein g in cre asin gly
use d to day fo r A I a nd m ach in e
le arn in g. W hy
do y o u th in k th is is ?
Chun
: P yth on m ake s a g re at la nguage, re gard le ss o f th e fie ld th at it is
applie d to . P yth on
does n ot r e quir e it s u se rs to b e c o m pute r s cie ntis ts in
ord er to b e a ble to s o lv e
pro ble m s. T he la nguage s yn ta x d oes n ot g et in
th e w ay fo r th ose w ho w ant a to ol to
build s o lu tio ns w it h . P yth on is a ls o
gre at a t e nco ura gin g g ro up c o lla bora tio n b eca use
of it s u nders ta ndable
syn ta x.
Dris co ll
: S o how do yo u th in k th at P yth on co uld be m ade a bette r
la nguage fo r A I a nd m ach in e
le arn in g?
Chun
: T he c o ntin ued d eve lo pm en t o f e xis tin g P yth on lib ra rie s a nd th e

cre atio n o f n ew lib ra rie s
would m ake w ork in g in th e A I fie ld e ve n e asie r.
That w ould h elp e ve ry o ne.
Wesle y C hun: 'T he c o ntin ued d evelo pm en t o f e xis tin g P yth on
lib ra rie s a n d t h e c re atio n
of n ew lib ra rie s w ould m ake w ork in g in
th e A I f ie ld e ven e asie r.'
Dris co ll
: W hat c h anges w ould y o u lik e to s e e in
fu tu re P yth on r e le ase s?
Chun
: I'd lo ve to s e e fe w er P yth on re le ase s a nd fe w er n ew fe atu re s. I
th in k w hat th e la nguage
has to day ( P yth on 3 .6 ) is g re at.
Wesle y C hun: 'I 'd lo ve t o s ee f e w er P yth on r e le ases a n d f e w er n ew
fe atu re s.'
Sure , w e n eed to h ave b ug a nd s e cu rit y fix e s. A ddit io nal p erfo rm ance
im pro ve m ents
would a ls o b e w elc o m e, a lo ng w it h th e so lv in g o f th e
Glo bal In te rp re te r Lock is su e.
How eve r, I'd lik e to se e th e re le ase
sch edule s s tr e tc h ed o ut.
Eve ntu ally , I'd lik e to s e e d eve lo pm ent m ostly s to p w it h P yth on, s o th at it
co uld
be r e co gniz e d a s a s ta ndard lik e C o r C ++. If fu rth er im pro ve m ents
need to b e m ade,
th en th ey c a n c o m e a s r e vis io ns to th e
s ta ndard . B ein g
re co gniz e d a s a sta ndard w ill b rin g a bout P yth on's le git im acy a nd
it s
gre ate r a doptio n, e sp ecia lly in la rg er c o rp ora tio ns.
Dris co ll
: T hank y o u, W esle y C hun.

C hap te r 1 4. S te ven L ott
S te ve n L ott
is a n A m eric a n so ftw are d eve lo per a nd a uth or. H e is a n
a sso cia te fo r th e b ank h old in g
co m pany C apit a l O ne a nd u se s P yth on to
b uild A PIs fo r n ew p ro ducts . P re vio usly , h e
work e d a s a s o lu tio n a rc h it e ct
f o r C TG , w hic h p ro vid es IT s e rv ic e s. In 2 003, S te ve n
sta rte d u sin g h is
t a le nt
fo r so lv in g p ro ble m s w it h
Pyth on to w rit e b ooks. H e h as sin ce
a uth ore d tit le s in clu din g
Modern P yth on C ookb ook
,
Pyth on fo r S ecre ts
A gents
, a nd
Functio nal P yth on P ro gra m min g
. S te ve n
cre ate s e duca tio nal
c o nte nt fo r th e P yth on c o m munit y a nd w rit e s a te ch b lo g.
Dis cu ssio n t h em es: P yth on p ro s a n d c o ns, P yth on b ooks, v 3.6 .
Catc h u p w it h S te ven L ott h ere : @ s_lo tt
M ik e D ris co ll
: S o
w hy d id y o u b eco m e a p ro gra m mer?
S te ven L ott
: I s ta rte d p ro gra m min g in th e 1 970s, w hen c o m pute rs w ere
r a re . M y s ch ool h ad tw o
Oliv e tti P ro gra m ma 1 01 c a lc u la to rs a nd a n IB M
1 620 c o m pute r.
I t w as em pow erin g bein g able to cre ate use fu l behavio r on th ese
m ach in es, s u ch a s
sim ula tin g ra ndom e ve nts , d ra w in g th in gs a nd tr y in g
t o d esig n n ew k in ds o f g am es.
A r e sp onsiv e a nd a uto nom ous d evic e w as
t h e u lt im ate to y, e ve n w hen d oin g m ath h om ew ork .
The id ea o f b uild in g

th in gs th at w ere n ew a nd u se fu l v ia s o ftw are w as c o m pellin g.
Als o , I h ad
a b unch o f fr ie nds w ho h ung a ro und in th e c o m pute r r o om .
Dris co ll
: H ow d id y o u
s ta rt u sin g P yth on?
Lott
: In th e la te 90s, as obje ct- o rie nte d pro gra m min g w as build in g
mom entu m , I s ta rte d
tr a ckin g th e p opula r la nguages.
I h ad a M acin to sh w it h th e p ort o f S m allt a lk -8 0, th e T H IN K C ++ c o m pile r
and a J D K
1.1 . I m ade re gula r s e arc h es fo r e m erg in g o bje ct- o rie nte d
pro gra m min g te ch nolo gy a nd
eve ntu ally fo und P yth on.
Ste ven L ott: 'T he b arrie rs t o e n tr y f o r P yth on w ere s o m uch lo w er
th an t h e o th er la n guag es
th at I h ad le arn ed .'
The b arrie rs to e ntr y fo r P yth on w ere so m uch lo w er th an th e o th er
la nguages th at
I h ad le arn ed. T here w as o nly a ru ntim e a nd n o c o m ple x
to olc h ain re quir e d to b uild
so ftw are . P yth on w as re pla cin g P erl, A W K,
se d, a nd g re p w it h o ne to ol th at h andle d
a v a rie ty o f u se c a se s. B y 2 0 00,
I w as tr y in g to b uild u se fu l a nd w ork in g a pplic a tio ns
in P yth on.
Dris co ll
: W hat d id y o u lik e a bout P yth on?
Lott
: A t fir s t, I w as dra w n to th e
ele gant sim plic it y of P yth on. T he
sta ndard lib ra ry p ro vid ed a n a m azin g a rra y o f to ols .
As I le arn ed m ore ,
th e v a st e co syste m o f m odule s a nd p acka ges o uts id e o f th e s ta ndard
lib ra ry s h ow ed m e h ow m uch c o uld b e d one.
I u se d P yth on a t w ork b eca use I co uld so lv e a p ro ble m q uic kly . T he
la nguage w as w onderfu l
fo r c o m ple x d ata w ra nglin g p ro ble m s. In m any
ca se s, s u cce ss s te m med fr o m g ettin g s ta rte d
quic kly a nd d is co ve rin g th e
nuance s a nd c o m plic a tio ns o f a p ro ble m a s e arly a s p ossib le .
Pyth on
enco ura ges y o u to fa il q uic kly a nd s ta rt a gain o n a n ew c o urs e .
Ste ven L ott: 'P yth on e n co ura g es y o u t o f a il q uic kly a n d s ta rt a g ain
on a n ew c o urs e.'

The m ore th at I le arn a bout N um Py, th e m ore th at I s e e P yth on a s a k in d
of u niv e rs a l
co nta in er fo r c o de. T he N um Py lib ra rie s a re b ase d o n C ( a nd
Fortr a n), s o h avin g a
Pyth on w ra pper m ake s th em w id ely a va ila ble a nd
use fu l.
The u nderly in g re aso n fo r u sin g P yth on w asn 't c le ar to m e u ntil G uid o
va n R ossu m 's
ke yn ote s p eech a t P yC on 2 016. P yth on's b ig gest s tr e ngth
ste m s fr o m th e co m munit y .
Pyth on's o pen so urc e n atu re cre ate s a nd
enco ura ges a c o m munit y e ff o rt to b uild c o ol
new th in gs.
Ste ven L ott: 'P yth on's b ig gest s tr e n gth s te m s f r o m t h e c o m munit y .'
Pyth on h as n um ero us
oth er s tr e ngth s, s u ch a s it s w id e a doptio n a s a
la nguage. P yth on is u se d in n um ero us
co nte xts : s cie ntis ts a re u sin g it to
analy ze tr u ly gig antic data se ts and it 's use d
to build sca la ble w eb
se rv ic e s to o. P yth on is a ls o u se d r e cre atio nally b y h om e h acke rs
who a re
in te gra tin g th eir A le xa , N est, a nd A rd uin o-b ase d te m pera tu re s e nso rs .
Anoth er s tr e ngth o f P yth on is s o m etim es c a lle d
batte rie s in clu ded
. W it h a
sin gle d ow nlo ad, y o u h ave a ll th e to ols y o u w ant. If y o u w ant to le arn th e
la nguage, th en y o u c a n s ta rt w it h th e d is tr ib utio n fo r y o ur c o m pute r. If y o u
want
to do data scie nce , th en yo u ca n sta rt wit h th e Anaco nda
dis tr ib utio n, w hic h is w here
lo ts o f p acka ges a re b undle d.
The P yth on S oftw are F oundatio n (P SF) m ake s a ctiv e ste ps to b e a s
in clu siv e a s p ossib le .
The p hilo so phy is th at e ve ry o ne s h ould b e a ble to
le arn a nd s h are th eir fin din gs.
Pyth on's c o m munit y b elie ve s th at n obody
sh ould b e e xclu ded. W e'r e a ll u sin g P yth on
to s o lv e p ro ble m s, s o w e a ll
need h elp .
Dris co ll
: W hat a re
Pyth on's w eakn esse s a s a la nguage?
Lott
: I'v e c o lle cte d a fe w lis ts o f P yth on's w eakn esse s. S om e o f th em a re
utte rly fa rc ic a l
and I'v e s e en m any s e ntim ents w hic h m ake n o s e nse a t
all. A fe w c o m pla in ts a bout P yth on
are m eanin gfu l.
Ove ra ll, I'v e le arn ed th at m ost p ro ble m s th at a re b la m ed o n th e P yth on
la nguage b ein g
slo w a re m ore o fte n th an n ot d ue to in eff e ctiv e a lg orit h m

and d ata s tr u ctu re c h oic e s.
Ste ven L ott: 'P yth on's c o re r u ntim e is r e m ark ab ly f a st.'
Pyth on's c o re r u ntim e is r e m ark a bly fa st. F ortr a n a nd C a re c o nsid era bly
fa ste r beca use
th ey have optim iz in g co m pile rs , th at pro duce co de
fo cu se d o n th e u nderly in g c h ip se t.
The S ciP y a nd N um Py u se o f b in ary
co de w ra pped in P yth on a ddre sse s th is c o nce rn n ic e ly .
Anoth er is su e is th e o pportu nit y fo r
co nfu sio n w hen u sin g P yth on. T he
orth ogonalit y b etw een la nguage s ta te m ents a nd d ata
str u ctu re s m eans
th at lis ts , se ts , a nd d ic tio narie s h ave so m e o ve rla ppin g fe atu re s.
The
im mense ly so phis tic a te d im ple m enta tio n of Pyth on data str u ctu re s
make s it p ossib le
to m ake a b ad c h oic e a nd g et c o rre ct a nsw ers , b ut
have h orrib ly in eff ic ie nt c o de.
Lastly , a w eakn ess fo r P yth on is th e p ossib ilit y o f c re atin g in herit a nce
pro ble m s.
Eve ry th in g is d yn am ic , s o it c a n b e d if f ic u lt fo r to ols lik e P ylin t
to d is ce rn m eanin gfu l
meth od re defin it io ns fr o m s p ellin g m is ta ke s w it h
sim ila r-lo okin g m eth od n am es a nd
pla in b ad d esig n.
The
collections.abc
m odule
has deco ra to rs th at ca n be use d to
org aniz e c o de a nd p ro vid e s o m e h elp w it h c h eckin g
re defin it io ns. T he
ty p e defin it io ns in th e
typing
m odule allo w m yp y to lo ca te pote ntia l
pro ble m s.
Dris co ll
: S o h ow d id y o u e nd u p b eco m in g a n a uth or o f P yth on b ooks?
Lott
: M ost ro le s in m y c a re er m ore o r le ss ju st h appened to m e, b ut
beco m in g a w rit e r
was a c o nscio us d ecis io n.
In th is ca se , I h ad d ecid ed th at th ere co uld b e va lu e in te ach in g th e
Pyth on la nguage
and th e a sso cia te d s o ftw are e ngin eerin g s kills . I s ta rte d
to c o lle ct n ote s fo r a b ook
in 2 002. B y 2 010, I h ad tr ie d s e lf - p ublis h in g
se ve ra l b ooks o n P yth on.
Ste ven L ott: 'O ver a f e w y ears , I a n sw ere d t h ousan ds o f q uestio ns

ab out P yth on a n d
so m eh ow b uilt u p a la rg e r e p uta tio n.'
When S ta ck O ve rflo w sta rte d, I w as a n e arly p artic ip ant. T here w ere
many in te re stin g
Pyth on q uestio ns. T he q uestio ns s h ow ed g aps w here
more in fo rm atio n w as n eeded a bout
Pyth on sp ecif ic a lly a nd so ftw are
engin eerin g in genera l. O ve r a fe w ye ars , I answ ere d
th ousa nds of
questio ns a bout P yth on a nd s o m ehow b uilt u p a la rg e r e puta tio n.
Dris co ll
: W hat h ave y o u
le arn ed in th e w rit in g p ro ce ss?
Lott
: I'v e le arn ed about th e dif f ic u lt y of cre atin g m eanin gfu l and
in te re stin g e xa m ple s.
An exa m ple needs to have a sto ry arc and a
pro ble m th at r e quir e s a s o lu tio n.
Sto rie s re quir e d ra m a a nd c o nflic t, a nd th at d oesn 't o fte n s u rfa ce w hen
th in kin g about
data str u ctu re s and alg orit h m s. I sp end m ore tim e
wanderin g a ro und tr y in g to th in k
of e xa m ple s th an d oin g a ny o th er p art o f
th e w rit in g p ro ce ss. A lo t o f th e p ro ble m s
th at I c o m e u p w it h a re to o
la rg e a nd c o m ple x.
A s n ip pet o f c o de is
dif f ic u lt to d escrib e if it d oesn 't s o lv e a p ro ble m .
For e xa m ple , th e tr a ve lin g s a le sm an p ro ble m h as a c o m pellin g s to ry a rc
th at c h ara cte riz e s
gra ph tr a ve rs a l. H avin g a s to ry p ro vid es a fr a m ew ork
fo r re m em berin g th e esse ntia l
pro ble m and se ein g how th e so lu tio n
work s. P ure c o de d oesn 't h elp a nyo ne to u nders ta nd
why th e la nguage
co nstr u ct is im porta nt. C ode only exis ts to so lv e a pro ble m , so it 's
im pera tiv e to d escrib e th e p ro ble m .
Ste ven L ott: 'P ure c o de d oesn 't h elp a n yo ne t o u nders ta n d w hy t h e
la n guag e c o nstr u ct
is im porta n t. C ode o nly e xis ts t o s o lv e a
pro ble m , s o it 's im pera tiv e t o d escrib e
th e p ro ble m .'
Cre atin g s to rie s re quir e s th e tim e to v ie w th e p ro ble m fr o m a d is ta nce ,
whic h is e sse ntia l
fo r s u m mariz in g a nd a bstr a ctin g o ut n eedle ss d eta ils .
Fin din g th e rig ht d eta ils re quir e s
a d eep u nders ta ndin g. I k n ow th at I'v e
fa ile d w hen th e d escrip tio n o f th e co de b eco m es
lo ng a nd co m ple x,

in vo lv in g ta ngentia l to pic s.
Dris co ll
: W hat are th e pro s and co ns of se lf - p ublis h in g
yo ur books
ve rs u s u sin g a r e gula r p ublis h er?
Lott
: T he d if f e re nce b etw een
se lf - p ublis h in g a nd u sin g a p ublis h er is
edit in g. T he w ay th at P yth on handle s docu m enta tio n
te stin g (v ia th e
doctest
m odule ) m eans th at th e te ch nic a l a sp ects o f th e c o nte nt c a n b e
va lid ate d a uto m atic a lly .
I'v e b eco m e b ette r a t th is , b ut th ere a re s till s o m e
te stin g g aps in m y p ublis h ed
co de.
Oth er ch alle nges are gra m mar, usa ge, cla rit y , pre cis io n, co lo r, unit y ,
co here nce ,
and c o ncis io n. W it h P ackt P ublis h in g, th ere 's a p ip elin e o f
edit o rs w ho a sk q uestio ns
and n otic e th e in co m pre hensib le p arts , lo ng
befo re m y b ook la nds in th e h ands o f a
re ader.
When I s e lf - p ublis h ed, I d id w hat s e em ed b est to m e. P ublis h ers m anage
co sts , p ric e s,
and r e ve nue s tr e am s a dro it ly . M y jo b is to k n ow P yth on a nd
Packt P ublis h in g h andle s
th e r e st.
Dris co ll
: H ave y o u
le arn ed a nyth in g fr o m y o ur r e aders ? If s o , w hat?
Lott
: M y re aders h ave ta ught m e th e im porta nce o f u sin g th e P yth on
doctest
to ol fo r c h eckin g e ach e xa m ple in th e b ody o f a b ook. R eaders
have s p otte d n um ero us
erro rs fr o m c o de th at I d id n't c h eck p ro perly .
Dris co ll
: W hat h as b een y o ur
fa vo rit e in te ra ctio n w it h a r e ader?
Lott
: I w ork fo r a te ch c o m pany in N orth ern V ir g in ia . A c o -w ork e r w as
su rp ris e d to fin d
out th at I'd w rit te n
Maste rin g O bje ct- O rie nte d P yth on
.
They h ad b ought th e b ook b ase d o n re co m mendatio ns a nd re ad th e
outlin e, w it h out
re ally lo okin g a t th e a uth or's n am e.
Dris co ll
: S o w hic h o f y o ur b ooks h as b een th e m ost p opula r? W hy d o
yo u th in k th at p eople b uy
one b ook o ve r a noth er?
Lott
: M y m ost
su cce ssfu l b ook h as b een
Pyth on fo r S ecre t A gents
. It
se em s lik e th e fu n fa cto r is p art o f th at. If a b ook h as a w id e v a rie ty o f fu n
exe rc is e s a nd p ro ble m s, th en r e aders c a n s e e h ow P yth on a pplie s to th e
pro ble m s th at
th ey k n ow a nd w ant to s o lv e . If th e b ook is to o n arro w ly

fo cu se d on one pro ble m dom ain ,
or to o abstr a ct, th en th e pra ctic a l
applic a tio ns b eco m e h ard to e nvis io n.
Dris co ll
: W hat n ew a nd e xcit in g tr e nds
a re y o u s e ein g in P yth on?
Lott
: P yth on 3 .6 is fa st a nd g ettin g fa ste r. T he d eve lo pers w ork in g o n
fo undatio nal a lg orit h m s
have d one im pre ssiv e th in gs.
Ste ven L ott: 'P yth on 3 .6 is f a st a n d g ettin g f a ste r. T he d evelo pers
work in g o n f o undatio nal
alg orit h m s h ave d one im pre ssiv e t h in gs.'
The n ew in te rn al d ata str u ctu re s fo r th e
dict
sa ve m em ory a nd ru n
fa ste r. T his k in d o f in te rn al re -e ngin eerin g is e xcit in g. T here
are h uge
benefit s th at c o m e fr o m h avin g a n u pgra de w it h fe w v is ib le c h anges to
th e
la nguage.
Anoth er e xcit in g d ir e ctio n th at P yth on is g oin g in is co nnecte d to th e
myp y p ro je ct
and th e ty p e h in ts . Y ou h ave a h andy q ualit y to ol th at
doesn 't in vo lv e a p ro fo und
ch ange to th e la nguage, o r th e d eve lo pm ent
to ols . T his c a n h elp y o u to w rit e m ore
re lia ble c o de, w it h out in tr o ducin g
sig nif ic a nt o ve rh eads. If m yp y b eco m es p art o f
Pylin t o r P yfla ke s, th en
th at w ill h elp e ve n m ore .
As a n A rd uin o m ake r, I o fte n
c o lle ct d ata fo r la te r a naly sis u sin g P yth on-
base d to ols . M y c u rre nt p ro je ct in vo lv e s
a c u sto m iz e d G PS tr a cke r, w hic h
will b e u se d o n a b oat to m onit o r it s p osit io n w hile
at a nch or. A n a la rm
will so und w hen th e ve sse l is drif tin g. There are num ero us oth er
exa m ple s of In te rn et of th in gs (Io T ) pro je cts , w here Pyth on is an
im porta nt p art o f
th e o ve ra ll e ff o rt to b uild s o m eth in g n ew a nd u se fu l.
Dris co ll
: Do yo u se e Pyth on beco m in g a popula r la nguage fo r
em bedded p ro gra m min g n ow th at
Mic ro P yth on is b eco m in g p opula r?
Lott
: Y es, M ic ro P yth on
a nd th e p yb oard a re e xcit in g n ew d eve lo pm ents .
Rasp berry P is a ls o
ru n P yth on n ic e ly .
Ste ven L ott: 'M ic ro P yth on a n d t h e p yb oard a re e xcit in g n ew

develo pm en ts .'
Pro ce sso rs c o ntin ue to b eco m e fa ste r a nd s m alle r, w hic h m eans th at
more s o phis tic a te d
la nguages c a n b e u se d. O ne o f th e fir s t c o m pute rs
th at I e ve r u se d h ad 2 0K o f m em ory
and w as th e s iz e o f a n u prig ht p ia no.
My fir s t A pple II P lu s h ad 6 4K o f m em ory a nd
co ve re d th e to p o f a d esk.
A p yb oard h as 1 M o f R O M a nd 1 92K o f R AM in a p acka ge w hic h
is ju st
ove r tw o s q uare in ch es.
Dris co ll
: T hank y o u, S te ve n L ott.

C hap te r 1 5. O liv er S ch oen born
O liv e r S ch oenborn
is a C anadia n s o ftw are d eve lo per a nd in dependent
s o ftw are d eve lo per. P ast ro le s h ave
in clu ded w ork in g a s a sim ula tio n
c o nsu lt a nt a t C AE In c a nd a s a v is u aliz a tio n s o ftw are
deve lo per a t th e
N atio nal Rese arc h Council Canada. Oliv e r is passio nate about
c o nnectin g
wit h th e b usin ess a nd g ove rn m ent c o m munit ie s. H e is th e
a uth or o f P yp ubsu b (h oste d
at
http s://g it h ub.c o m /s ch ollii/ p yp ubsu b
), a
P yth on p acka ge th at g iv e s u se rs a s im ple w ay to d eco up le p arts o f th eir
e ve nt- b ase d
applic a tio n. Oliv e r re gula rly update s Pyp ubsu b and
c o ntr ib ute s to th e w xP yth on m ailin g
lis t.
Dis cu ssio n t h em es: P yp ubsu b, P yth on in A I, P yth on's f u tu re .
Catc h u p w it h O liv er S ch oen born h ere : @ sch ollii2
M ik e D ris co ll
: S o le t's s ta rt w it h y o ur
backg ro und. W hy d id y o u d ecid e to
b eco m e a p ro gra m mer?
O liv er S ch oen born
: W ell, a b uddy a t s ch ool w as s e llin g h is A pple IIe . I
h ad n eve r d one p ro gra m min g
befo re th at, b ut I d ecid ed to b uy h is u se d
c o m pute r. I w as 1 4 a t th e tim e.
I re m em ber b ein g q uit e in tr ig ued b y th e B ASIC a nd a sse m bly la nguage.
T here w as a c o m mand
pro m pt a nd y o u c o uld s o m ehow d ro p in to th e

asse m bly le ve l to w rit e asse m bly . I re ad
th e m any m anuals fo r th e
co m pute r, w hic h d escrib ed h ow to p ro gra m it . I tr ie d to w rit e
so m e lit tle
pro gra m s a nd e ve ntu ally g ot in to P asca l. I r e ally e njo ye d it .
In m y fif th ye ar of hig h sch ool, a sch ool te ach er aske d us to do
so m eth in g w it h a
la nguage ca lle d Logo. It w as basic a lly gra phic s
co m mands to m ove a p en r ig ht, le ft,
dra w lin es e tc . I c re ate d a s im ula tio n
lo op in th ere s o th at I c o uld s im ula te a lit tle
air c ra ft fly in g a nd d ro ppin g a
bom b. It w as v e ry s im ple b ut it w as fu n, a nd th e te ach er
was im pre sse d!
So th at's h ow I g ot in to p ro gra m min g. It w as m ore o r le ss a c h ance in
so m e w ays. A t
th at p oin t, p ro gra m min g w as s till ju st a h obby, b eca use
my g oal w as to g et in to p hysic s.
Dris co ll
: S o h ow d id y o u e nd u p g ettin g in to P yth on it s e lf ?
Sch oen born
: A t w ork w e h ad a p ro je ct th at n eeded s o m e g ra phic a l u se r
in te rfa ce d eve lo pm ent o n
Win dow s.
For
th e p re vio us 1 0 y e ars , I h a d m ostly p ro gra m med in C ++ o n U NIX ,
deve lo pin g c o m mand
lin e a nd 3 D g ra phic s a pplic a tio ns, b ut n ot m enu-
base d applic a tio ns (e xce pt fo r a G UI
writ te n in Ja va A W T). I re a lly
dre aded M FC , s o I s ta rte d lo okin g in to o ptio ns o n W in dow s
fo r d oin g
th at. I c a m e a cro ss P yth on (b eca use it w as p la tfo rm in dependent) , a nd
Tk.
Oliv er S ch oen born : 'P yth on w as t h e p erfe ct f it . A s s o on a s I s aw t h e
la n guag e, I r e ally
re la te d t o it s s im ple a n d c le an s yn ta x.'
Pyth on w as th e p erfe ct fit . A s s o on a s I s a w th e la nguage, I r e ally r e la te d
to it s
sim ple a nd c le an s yn ta x. I d on't k n ow if it ju st m atc h ed m y w ay o f
th in kin g. I a ls o
fo und w xP yth on a nd s a w th at it s A PI s e em ed to b e r a th er
so lid . I fe ll in lo ve w it h
Pyth on a nd th e a bilit y it p ro vid ed to q uic kly c re ate
in te rfa ce s u sin g w xP yth on.
So how I got in to Pyth on was th ro ugh a work pro je ct th at had
re quir e m ents th at w ere
more e asily a ch ie va ble in P yth on th an in C ++.

Dris co ll
: W as th is h ow y o u g ot in vo lv e d w it h th e
w xP yth on c o m munit y
a s
well?
Sch oen born
: T hat's rig ht. I d eve lo ped m y fir s t a pplic a tio n in w xP yth on
as a r e su lt o f th at p ro je ct.
It w as a n a pplic a tio n fo r a naly zin g s e at h eatin g
and air -c o ndit io nin g. B ack th en,
auto m obile se at co m fo rt w as bein g
pro to ty p ed u sin g th is k in d o f s o ftw are .
So I u se d w xP yth on a nd I th ought th at th e p ublis h -s u bscrib e p atte rn th at
it s u pporte d
was a r e ally a w eso m e id ea. I g ot in vo lv e d m ore h eavily w it h
th e w xP yth on d eve lo pm ent
by ta kin g o ve r th e P ubsu b c o m ponent o f th at
lib ra ry .
Oliv er S ch oen born : 'I g ot in vo lv ed m ore h eavily w it h w xP yth on
develo pm en t b y t a kin g
over t h e P ubsu b c o m ponen t o f t h e
wxP yth on lib ra ry .'
Dris co ll
: S o w as P ubsu b
s ta rte d b y s o m eone e ls e ?
Sch oen born
: Y es, R obb S hecte r
cre ate d th e fir s t ve rs io n o f P ubsu b.
There w ere lim it a tio ns th at I
needed to g et a ro und (m ostly ,
a m em ory
le ak: s u bscrib ers w ere n ot r e le ase d a fte r
th ey w ere n o lo nger n eeded b y
th e a pplic a tio n), a nd I p ro pose d s o m e s ig nif ic a nt p atc h es
and u nit te sts .
Robb w as lo okin g fo r s o m eone to ta ke o ve r
wx.lib.pubsub
. S o I d id th at.
Dris co ll
: Is th at a ls o w hen P ubsu b g ot s p lit in to it s o w n m odule a w ay
fr o m w xP yth on?
Sch oen born
: I th in k it w as a c o uple o f y e ars la te r. P ubsu b
was p re tty
much a sta ndalo ne su b-p acka ge, where as m ost oth er wx.lib su b-
packa ges re quir e d
oth er w xP yth on co m ponents . I w ante d to m ake
wx.lib .p ubsu b a va ila ble to a b ro ader s e t
of d eve lo pers , a nd o th ers o n th e
wxP yth on d eve lo pers g ro up a gre ed.
Oliv er S ch oen born : 'P ubsu b w as p re tty m uch a s ta n dalo ne
co m ponen t.'

Dris co ll
: W ere y o u g uys a w are o f th e
PyD is p atc h er p ro je cts
a t th at tim e?
Sch oen born
: W ell, I d id b eco m e a w are o f P yD is p atc h er a t s o m e p oin t in
th ose y e ars . It w as q uit e
a d if f e re nt a ppro ach .
I re m em ber th at at th e tim e it w as not to pic - base d. P ubsu b w as
su ff ic ie ntly d if f e re nt
fr o m it to b e ju stif ie d a s a s e para te p acka ge. It h as
been a w hile s in ce I h ave lo oke d
at it , b ut it w ould b e in te re stin g a ctu ally
to s e e w here P yD is p atc h er is a t n ow .
There are se ve ra l pro je cts now th at use th e basic id ea of to pic s,
messa gin g, a nd p ublis h /s u bscrib e
(s u ch a s M QTT a nd G oogle p ub/s u b),
but a t th e n etw ork , th at is th e in te r-a pplic a tio n
le ve l, w here as P yp ubsu b
is a t th e a pplic a tio n in te r-c o m ponent le ve l. T hey h ave e vo lv e d
much
more th an Pubsu b has had to evo lv e ; Pyp ubsu b is m atu re and
pro ductio n q ualit y .
Dris co ll
: S o I n otic e d th at w hen y o u d id th at in te rv ie w w it h m e in th e
PyD ev o f th e W eek se rie s,
yo u h ad sw it c h ed
to P yQ t. H ow d id th at
happen?
Sch oen born
: T hat w as s o m e
tim e in 2 013. W e b asic a lly h ad th is p ro je ct
th at in vo lv e d m odern iz in g an old pro to ty p e
th at our clie nt had. T he
applic a tio n in vo lv e d use r-d efin ed scrip ts th at co uld be ru n
by th e
pro to ty p e a nd th ose w ere a ll w rit te n in P yth on. S o w e h ad to e it h er
em bed a
Pyth on in te rp re te r, o r tr a nsla te h uge P yth on s crip ts in to a noth er
la nguage, w hile
guara nte ein g th e s a m e o utp uts , (a ta sk th at c o uld n ot fit
wit h in th e s co pe o f th e
pro je ct b udget) .
Oliv er S ch oen born : 'W e h ad t o e it h er e m bed a P yth on in te rp re te r, o r
tr a n sla te h uge
Pyth on s crip ts .'
The g ra phic s in te rfa ce h ad to b e ve ry so phis tic a te d. A t th e tim e, th e
pro to ty p e had
a 3D co m ponent, w here th e use r co uld ro ta te m odel
co m ponents in a 3 D e nvir o nm ent.
We n eeded to in te gra te th e g ra phic a l
use r in te rfa ce w it h m enus a nd lis t v ie w s a s a
so phis tic a te d 2 D a nd 3 D
ca nva s, w here th e u se r c o uld in te ra ct w it h th in gs.

We w ante d s o m eth in g th at w as s ta ble , p ow erfu l, a nd w ell- d ocu m ente d,
wit h a n a ctiv e
co m munit y b ehin d it . A t th e tim e, W PF, w xP yth on, a nd
PyQ t (o r Q t, fo r a C ++ in fr a str u ctu re )
were th e m ain c a ndid ate s fo r u s.
On th e C # sid e th ere
w as W PF. W e lo oke d a t a n um ber o f d if f e re nt
appro ach es a nd in th e e nd it w as b etw een
wxP yth on a nd P yQ t.
PyQ t s e em ed to h ave m ore p ow erfu l in te gra tio n o f a 3 D e nvir o nm ent
th an w xP yth on d id .
PyQ t a ls o s e em ed to b e q uic kly g ro w in g to w ard s
su pportin g a 3 D s ce ne g ra ph, w here as
in w xP yth on I w ould h ave h ad to
use O penG L, a nd th is w ould h ave b een m ore c o m plic a te d.
Pyth on 3 w as re quir e d, b ut I
th in k th at's w hen R obin D unn d ecid ed to
cre ate w xP yth on 3 , a nd s o th e w ork o n s u pportin g
Pyth on 3 w as s till v e ry
early . Basic a lly , th ere w as only Pyth on 2.7 fo r w xP yth on and
th e
ava ila bilit y of Qt Desig ner was als o a fa cto r. PyQ t had a ve ry
so phis tic a te d in te rfa ce
fo r c re atin g d esig ns.
Oliv er S ch oen born : 'P yQ t d efin it e ly s eem ed t o h ave m om en tu m .'
An X M L-d riv e n u se r in te rfa ce d escrip tio n w as s u pporte d b y b oth P yQ t
and W PF.
PyQ t d efin it e ly s e em ed to h ave m om entu m , a nd it s u pporte d c o m merc ia l
use o f th e p acka ge,
whic h w as im porta nt fo r th at p ro je ct. I h ad h ad s o m e
negativ e e xp erie nce s w it h W PF,
fig htin g w it h th e b la ck-m agic th at it u se d
in ord er to bin d pro pertie s to w id gets .
Als o , th ere w ere sig ns th at
Ir o nP yth on w as u nm ain ta in ed. A ll th in gs c o nsid ere d, w e
pic ke d P yQ t. W e
did n ot r e gre t th e c h oic e .
Dris co ll
: G oin g b ack to th e P yp ubsu b p art,
I fo rg ot to a sk y o u, d id y o u
have a ny c h alle nges w hile ru nnin g th at o pen s o urc e p ro je ct
th at y o u'd
lik e to ta lk a bout?
Sch oen born
: W ell, it w asn 't re ally a te ch nic a l c h alle nge, b ut I d id h ave
an in te re stin g e xp erie nce
fr o m a n o pen so urc e d eve lo pm ent p oin t o f
vie w . It re m in ded m e th at y o u d on't re ally
co ntr o l th e s p ace th at y o u c a n
occu py in th e o pen s o urc e w orld .

Oliv er S ch oen born : 'Y ou d on't r e ally c o ntr o l t h e s p ace t h at y o u c an
occu py in t h e
open s o urc e w orld .'
What h appened w as th at P yp ubsu b w as o n S ourc e F org e, w here it w as
nam ed s im ply "p ubsu b",
beca use th at's h ow it w as n am ed in w xP yth on.
On P yP I I h ad n am ed it p yp ubsu b. A c o uple
of y e ars la te r, I fo und o ut
th at th ere w as a noth er p ro je ct o n S ourc e F org e c a lle d P yp ubsu b,
but it
hadn't g one a nyw here . B asic a lly , it w as a d ead p ro je ct a nd s o m etim es it
le d
to s o m e c o nfu sio n o n S ta ck O ve rflo w a nd th e tw o p yp ubsu b fo ru m s.
That to ok s o m e e ff o rt to s tr a ig hte n o ut. I h ad to c o nta ct th e a uth or a nd
exp la in w hat
was g oin g o n. E ve ntu ally , h e a gre ed a nd I w as a ble to ta ke
ow ners h ip o f th e " p yp ubsu b"
nam e o n S ourc e F org e.
In th e m eantim e, G it H ub h ad b eco m e re ally p opula r. S om e p eople h ad
co pie d m y P yp ubsu b
so urc e co de in to G it H ub, ju st to h ave it h andy.
Noth in g w ro ng w it h th at, b ut s in ce
th ese fo rk s w ere n ot to a dd fe atu re s,
when I a ctu ally d ecid ed to m ove P yp ubsu b to
Git H ub, I h ad to le t s o m e
devs k n ow th at P yp ubsu b w as fin ally a va ila ble th ere . I e xp la in ed
th at
th ere p ro bably w as n o lo nger a g ood re aso n to h ave s e para te c o pie s.
This w as
an in te re stin g a sp ect o f o pen s o urc e .
Dris co ll
: H ow m uch o f a
c o m mit m ent w as th e p ro je ct?
Sch oen born
: W ell, th ere h ave b een v a rio us p erio ds d urin g th e p ast 1 5
ye ars w hen I m ade m ajo r
ch anges to th e im ple m enta tio n a nd e xte nded
th e A PI: fix in g b ugs, u pdatin g d ocu m enta tio n,
and m ake su re th at a ll
te sts w ork w hen th ere w as a n ew re le ase o f P yth on. F in din g
th e tim e to
do th ose th in gs w as o fte n a c h alle nge. It is , I g uess, a noth er in te re stin g
asp ect o f w ork in g o n a v o lu nte er b asis .
Evo lv in g th e A PI, w hile m ain ta in in g b ackw ard s c o m patib ilit y , w as m ostly
re queste d
by R obin , th e w xP yth on a uth or, a nd th is w as im porta nt to m e
eve n if P yp ubsu b w as te ch nic a lly
se para te fr o m w xP yth on. It w as a m ajo r
te ch nic a l ch alle nge to m ake th at p ossib le .
This le d to th e co nce pt o f
Pubsu b s u pportin g th re e A PIs o r m essa gin g p ro to co ls .
Oliv er S ch oen born : 'I t w as a m ajo r t e ch nic al c h alle n ge.'

Fir s t, th ere w as b ackw ard s co m patib ilit y w it h th e ve ry fir s t ve rs io n o f
Pubsu b. T hat
was w hat I c a lle d th e v e rs io n 1 m essa gin g p ro to co l. T hen
th ere was th e so rt of "m odern "
Pubsu b, whic h had sig nif ic a nt
im pro ve m ents in th e A PI, a nd th ere w ere tw o A PIs fo r
th at.
One w as c a lle d
arg1
b eca use a ll m essa ge d ata w as in o ne b ig b lo b g iv e n
as o ne a rg um ent to th e
sendMessage()
fu nctio n. T he o th er w as c a lle d
kwargs
b eca use m essa ge d ata w as s e nt v ia k e yw ord a rg um ents in th e
sendMessage()
fu nctio n. That was th e defa ult when yo u in sta lle d
Pyp ubsu b s ta ndalo ne.
A v a nilla in sta lla tio n o f w xP yth on w ould in sta ll th e
arg1
A PI, s in ce th at
one w as a lm ost 1 00% c o m patib le w it h th e v e rs io n 1 A P I. A s e tu p fla g
co uld be se t in th e applic a tio n co de, befo re im portin g P yp ubsu b, to
ch oose th e
kwargs
p ro to co l. .
So g ettin g a ll th at to w ork w as a m ajo r h eadach e. I h ad to s o rt o f h ija ck
th e im port
syste m a lit tle b it , b asic a lly to a llo w fo r th e u se r to s a y, " W ell in
th is a pplic a tio n
I w ant th e
arg1
p ro to co l a nd in th is w xP yth on a pplic a tio n,
I w ant th e
kwargs
p ro to co l. ."
I a ls o a dded s o m e c o de to h elp tr a nsit io n a w xP yth on a pplic a tio n fr o m
ve rs io n 1 to
arg1
, to
kwargs
p ro to co l. T hat w as to ugh to o.
I r e ally w is h th at I h adn't h ad to d o a ll th at, b ut I fe lt a t th e tim e th at it w as
a n ece ssa ry e vil. . O th er th an c o de c o m ple xit y , it m ade th e im port s yste m
use d by Pyp ubsu b
ra th er co m plic a te d, whic h co uld in te rfe re wit h
fr e ezin g.
Dris co ll
: W hy d id y o u fo cu s o n m akin g th is tr a nsit io n p ossib le ?
Sch oen born
: B eca use I h ad to g o th ro ugh th at c h alle nge in o ne o f m y
ow n applic a tio ns on a pro je ct.
It w as usin g th e
arg1
pro to co l and
mig ra tin g it to th e n ew
kwargs
p ro to co l. A lt h ough n ot c o m ple x, th is w as
so m ew hat te dio us and erro r pro ne. It w as
worth addin g th ese erro r
ch ecke rs a nd g oin g th ro ugh th e tr a nsit io n, d ue to th e a dva nta ges
of th e
kwargs
A PI.
I h ad th e c o nce pt o f a p ara m ete r th at y o u c o uld s e t w hen y o u im porte d
Pyp ubsu b. T his
would co nfig ure P yp ubsu b to do so m e "in -b etw een"

ta sks, th at w ere u se fu l d urin g a
tr a nsit io n b etw een th e tw o m essa gin g
pro to co ls . T he b rid ge w ould a llo w y o u to g ra dually
move to w ard s b ein g
fu lly k w arg s, w it h s o m e h elp fu l fa cilit ie s a lo ng th e w ay.
Oliv er S ch oen born : 'T he c o de w as c erta in ly m ore c o m ple x t h an I
wan te d it t o b e.'
Gettin g to a s ta ble A PI to ok q uit e a b it o f e ff o rt. T he fr u str a tio n w as th at
th e c o de
was c e rta in ly m ore c o m ple x th an I w ante d it to b e, s o it w as a
hard er to m ain ta in
and h ard er to tr a ce c a lls th ro ugh P yp ubsu b. A ls o , it
ca use d so m e ch alle nges fo r people
who wante d to fr e eze th eir
applic a tio n.
As s o on a s I w as a ble to , I s u ggeste d w e d epre ca te a ll o f th at o ld s tu ff ,
sin ce it
was o nly u se fu l fo r th e w xP yth on a pp w it h th e o ld A PI. R obin
agre ed. In 2 016, I d ro pped
all s u pport fo r v e rs io n 1 a nd a rg 1 p ro to co ls ,
allo w in g fo r a m ajo r c le an u p a nd th e
sim plif ic a tio n o f th e c o de b ase . S o
now th ere 's ju st o ne A PI. T his is v 4 o f P yp ubsu b.
Dris co ll
: S o ca n yo u te ll m e a bout so m e o th er
Pyth on p ro je cts th at
yo u'v e b een in vo lv e d w it h la te ly ?
Sch oen born
: S ure , o ne is a re ally c o ol c lo se d-s o urc e p ro je ct, w hic h is
ve ry ch alle ngin g te ch nic a lly ,
wit h a ve ry so phis tic a te d G UI. I a ctu ally
mentio ned it in dir e ctly in d is cu ssin g th e
re aso n fo r w ork in g w it h P yQ t in
re ce nt y e ars .
The applic a tio n sh ow s a ca nva s on w hic h yo u ca n dro p boxe s and
co nnect th em to geth er
in d if f e re nt w ays. T he d if f e re nce fr o m a to ol lik e
Vis io is th at th e u se r c a n p ro gra m
th ese b oxe s to c h ange in tim e, lik e a n
anim atio n, to r e pre se nt a p ro ce ss.
The u se r d oes th is b y d efin in g P yth on s crip ts . T he a pplic a tio n a dds a liv e
Pyth on
nam esp ace to e ach u se r s crip t, s o th at th e u se r c a n d yn am ic a lly
query th e underly in g
model (s u ch as co de co m ple tio n on pro pertie s
dyn am ic a lly c h anged in th e m odel) .

Oliv er S ch oen born : 'T he a p plic atio n a d ds a liv e P yth on n am esp ace
to e ach u ser s crip t,
so t h at t h e u ser c an d yn am ic ally q uery t h e
underly in g m odel.'
So th ere 's a v e ry s o phis tic a te d in te rfa ce fo r c re atin g m odel c o m ponents ,
addin g th em ,
and lin kin g th em . T here is a ls o a v e ry s o phis tic a te d u ndo
fu nctio n th at c o ve rs a ll
th e d if f e re nt a sp ects o f m odel e dit in g.
Oliv er S ch oen born : ' A s u su al, t h ere w as 1 0% o f t h e f e atu re t h at
occu pie d 9 0% o f it s
dev t im e.'
We c o uple d th e v ie w to th e u ndo/r e do s o th at th e u se r c o uld a lw ays s e e
what w as goin g
to be undone, or re done, as th ey navig ate d th eir
docu m ent. T his w as a n in te re stin g
ch alle nge, a nd a s u su al, th ere w as
10% o f th e fe atu re th at o ccu pie d 9 0% o f it s d ev
tim e.
The a pplic a tio n is a s im ula tio n s yste m , s o it 's n ot ju st c re atin g lin es o r
boxe s.
There a re in te rfa ce c o m pone nts to m anage th e s im ula tio n, th at is ,
th e c h angin g o f
th e m odel in tim e, r e sto rin g it to it s in it ia l s ta te , s e ein g th e
queue o f c h anges,
etc .
So th ere is a v e ry la rg e s e t o f fu nctio nalit y in th e a pplic a tio n. B ut P yQ t
has b een
aw eso m e to w ork w it h in th at r e sp ect.
Dris co ll
: C ould y o u e xp la in a lit tle m ore a bout u sin g Q t
fo r th is p ro je ct?
Sch oen born
: Y es, Q t's G ra phic s V ie w h as
been re ally im pre ssiv e in
te rm s o f w hat it h as a llo w ed u s to d o.
I r e m em ber in th e b egin nin g, it w as n ot a lw ays o bvio us h ow to d o c e rta in
th in gs in
Qt. F or e xa m ple , in a c a nva s-b ase d a pplic a tio n, w here y o u c a n
do s o m any d if f e re nt
th in gs, it 's s u per u se fu l to h ave a s ta te m ach in e to
manage what ca n be done at any
giv e n m om ent. There is no
docu m enta tio n th at e xp la in s th is b eca use it is s o m eth in g
th at y o u le arn
ove r th e y e ars a s a u se fu l te ch niq ue. N ote th at Q t h as b uilt - in s u pport
fo r
sta te m ach in es, b ut it w asn 't s u ff ic ie ntly p ow erfu l fo r o ur n eeds.

A s ta te m ach in e a llo w s y o u to d efin e s ta te s in w hic h o nly c e rta in a ctio ns
are p ossib le .
So in th e "c re atin g lin e" s ta te , th e o nly th in g y o u c a n d o is
ca nce l c re atio n, d ra g
th e m ouse , o r s e le ct th e lin e ta rg et. T hat's w here
th e sta te mach in e sh in es. W it h out
it , yo ur co de ends up an
unm ain ta in able sp aghetti. Tro uble sh ootin g and exte ndin g wit h
new
actio ns is s o m uch s im ple r.
Alt h ough th e Q t d ocs a re e xce lle nt, th ere a re th in gs y o u fig ure o ut a s y o u
go. S om etim es
yo u s a y, " O h y e ah, I fin ally u nders ta nd h ow to d o th is . I'm
goin g to b acktr a ck a b it
and fix th in gs." Y ou e nd u p w it h a m ore ro bust
im ple m enta tio n th at c a n r e ally s u pport
th e n ext le ve l o f fe atu re s.
Oliv er S ch oen born : 'Y ou e n d u p w it h a m ore r o bust im ple m en ta tio n
th at c an r e ally h ave
th e n ext le vel o f f e atu re s.'
I'm s ta rtin g to g et k in d o f fa m ilia r w it h a ll o f th e w id gets th at Q t h as. T here
was
a n asty b ug th at w e fo und, w hen w e u pgra ded P yQ t, th at c a use d a
whole in te rfa ce to
sh ow a ll s o rts o f lin es a s y o u d ra gged p ie ce s a ro und.
Needle ss to s a y, th at w as a
pro ble m , b ut w e re ally n eeded to u pdate
PyQ t fo r o th er fe atu re s.
We tr a ce d th e p ro ble m b ack to th e C ++ la ye r a nd b y s o m e in cre dib le
str o ke o f lu ck,
th ere w as a w ork a ro und: th ere w as o ne lin e o f c o de th at
we ju st h ad to p ut in o ur
applic a tio n a t P yth on le ve l. W e d id n't e ve n n eed
to c h ange th e P yQ t s o urc e c o de. A s
lo ng a s w e h ad th at o ne lin e o f
co de, th en th e bug would go aw ay. I su bm it te d:
http s://b ugre ports .q t.io /b ro w se /Q TB U G -5 5918
.
Anoth er v e ry in te re stin g a sp ect o f u sin g Q t w as u nit te stin g. W e n eeded
unit te sts
fo r th e G UI sid e o f th e a pplic a tio n. W e u se d th e e xce lle nt
pyte st, a nd h ad o ne te st
su it e fo r th e c o re b usin ess lo gic , a nd o ne fo r th e
GUI c o m ponents . U nit te stin g a
GUI c a n b e re ally c h alle ngin g: y o u h ave
to s crip t u se r a ctio ns.
Luckily , Q t m ake s th is re la tiv e ly e asy, in th at y o u c a n e asily tr ig ger a ny
wid get
eve nt ju st b y c a llin g a m eth od. B ut b ein g e ve nt b ase d, w e n eeded
a w ay to d efin e a
bunch o f u se r a ctio ns, w it h th e e xp ecte d o utc o m e. S o I
cre ate d a lib ra ry to s u pport
doin g th is . U nfo rtu nate ly , s o urc e is c lo se d, s o

I c o uld n ot s h are th e c o de, b ut I
mentio ned th e id ea o n th e P yQ t fo ru m
and s o m e p eople im ple m ente d th eir o w n c o nce pt
of it .
Dris co ll
: P yth on is o ne o f th e
m ajo r la nguages b ein g u se d in th e A I a nd
mach in e le arn in g
b oom . W hat d o y o u th in k is b ehin d th is ?
Sch oen born
: I w ould s a y th at it 's th e "O ly m pia n" n atu re o f P yth on th at
make s it g ood fo r A I
and m ach in e le arn in g. P yth on h appens to b e v e ry
str o ng in m any o f th e n ece ssa ry e le m ents ,
in ste ad o f ju st o ne o r tw o.
Oliv er S ch oen born : 'I t 's t h e " O ly m pia n " n atu re o f P yth on t h at m akes
it g ood f o r A I
an d m ach in e le arn in g.'
For e xa m ple , P yth on c a n b e u se d fo r fu nctio nal, p ro ce dura l, o r o bje ct-
orie nte d c o din g,
in a ny c o m bin atio n, a nd th e c o de is s till u nders ta ndable
and c le an. M ore ove r, n o c o m pila tio n
needed m ake s th e e xp lo ra tio n o f
alg orit h m s a nd d ata s o e asy: y o u ju st m odif y th e c o de
and re -ru n th e
scrip t.
Fin ally , P yth on p ro vid es p ow erfu l a bstr a ctio ns u sin g a sim ple syn ta x.
Mayb e I'm b ia se d,
but I th in k th at P yth on is a t th e to p in th is r e sp ect. I'm
big o n e xp lic it a nd c le an
co de, a nd o n re fa cto rin g a nd te stin g. B ein g
str o ng a t a ll o f th ese th in gs m ake s P yth on
th e p erfe ct la nguage fo r A I.
Mik e Dris co ll: W hat co uld be done to m ake Pyth on a bette r
la n guag e f o r A I a n d m ach in e
le arn in g?
Sch oen born
: A la nguage is m ost u se fu l, in a g iv e n p ro ble m d om ain ,
when th e a bstr a ctio ns p ro vid ed
matc h th ose o f th e p ro ble m d om ain .
So if d eep le arn in g u se s n eura l n etw ork s, th en h avin g a g eneric c o nce pt
of a n eura l
net co uld b e re ally u se fu l. . T his is cu rre ntly p ro vid ed b y
lib ra rie s lik e T e nso rF lo w .
But p erh aps a s m ach in e le arn in g a lg orit h m s
im pro ve , a g eneric a bstr a ctio n fo r a n eura l
net w ill e m erg e th at ca n
beco m e a b asic d ata s tr u ctu re lik e lis ts a nd m aps.
Als o , I th in k w e n eed th e a bil it y to a sk th e A I/m ach in e le arn in g fu nctio ns,
"H ow d id
yo u g et to th is r e su lt ? " T hat's h ow h um ans v a lid ate c o nclu sio ns.

They a re a w are o f
th e lo gic th ey u se d, th ey c a n v e rb alis e it , a noth er
pers o n c a n fo llo w it , a nd th ey
ca n v e rif y it s c o rre ctn ess.
Dris co ll
: M any p eople I h ave ta lk e d to , a nd e ve n p eople a t P yC on, h ave
put a lo t o f e m phasis
on P yth on g ro w in g in th e d ata s cie nce fie ld . A re y o u
se ein g th at in w hat y o u'r e d oin g,
or c a n y o u g iv e m e a ny k in d o f o pin io n
one w ay o r th e o th er?
Sch oen born
: Yeah, P yth on is re ally gro w in g in th at fie ld . To ols lik e
Ju pyte r, A naco nda, a nd
scik it - le arn a re m ajo r re aso ns fo r th is , in m y
opin io n.
Pro bably in c o m bin atio n w it h th e fa ct th at w it h la rg e c o m pute p ow er, th e
sp eed o f
th e la nguage n o lo nger m atte rs s o m uch . P yth on c a n b e u se d in
em bedded s yste m s, s o
in p rin cip le s o m e p re dic tiv e a naly tic s b ase d o n
tr a in ed m ach in e m odels c a n h appen
in th e d evic e s th em se lv e s.
Oliv er S ch oen born : 'W it h la rg e c o m pute p ow er, t h e s p eed o f t h e
la n guag e n o lo ngers m atte rs s o m uch .'
There w as a r e ally in te re stin g p re se nta tio n a t P yC on in 2 017. A p re se nte r
was s u rv e yin g
th e
plo ttin g lib ra rie s la ndsca pe. T he s u rv e y s ta rte d w it h
matp lo tlib a nd e ve ry th in g a ro und
th at. T hen th e su rv e y m ove d o n to
so m e of th e Ja va S crip t lib ra rie s, in so m e ca se s
re la te d to P yth on
lib ra rie s. S o th is w as r e ally fa scin atin g, b eca use th ere is a lo t
of in te re st,
eve n fo r m y o w n c lie nts , in u sin g p andas, N um Py, a nd m atp lo tlib . T his
sh ow ed th at th ere a re m any d if f e re nt e xte nsio ns o r la ye rs th at y o u c a n
add.
Speakin g fr o m a clie nt pers p ectiv e , yo u w ant a ce rta in am ount of
ca pabilit y a nd y o u
don't w ant to b e lim it e d to o nly m atp lo tlib , b eca use
th ere 's s o m uch m ore th at's a va ila ble .
You a ls o k n ow th at y o u d on't w ant
to b e r e in ve ntin g th e w heel, s o y o u m ust m ake s u re
th at w hat y o u b uild is
su ff ic ie ntly g eneric . If y o u w ant to d o s ta tis tic a l a naly sis ,
th en y o u m ig ht
want to d o it w it h J u pyte r o r R . Y ou a lw ays tr y to g et a s e nse o f th e
applic a tio ns th at a re p ro vid in g th ese c a pabilit ie s.
You d on't w ant to fo rc e th e u se r to u se m atp lo tlib , b eca use it is s o d iv e rs e

and th e
API is s o a dva nce d. T here 's n o w ay th at y o u c a n p ro vid e a G UI
co m ponent th at s u pports
eve ry th in g th at m atp lo tlib c a n d o.
Pyth on is s u ch a n e xp re ssiv e la nguage a nd s o e asy to le arn . I th in k th at's
why P yth on
is s o b ig n ow in re se arc h a nd a pplie d re se arc h . It's e asy to
apply , s o phis tic a te d
and s o lv e s te ch nic a l p ro ble m s.
Oliv er S ch oen born : 'P yth on is s u ch a n e xp re ssiv e la n guag e a n d s o
easy t o le arn . I t h in k t h at's w hy P yth on is s o b ig n ow in r e searc h
an d a p plie d r e searc h .'
Pyth on g iv e s y o u a ll o f th e to ols to m ake a nd p ro vid e s o m eth in g th at's
ro bust a nd
dete rm in is tic . W e c a n m easu re p erfo rm ance , fin d b ottle necks
or fin d m em ory le aks.
There a re s o m any th in gs th at r e ally m ake P yth on
a g re at to ol.
Dris co ll
: H ave th ere been any oth er partic u la rly
mem ora ble P yC on
pre se nta tio ns?
Sch oen born
: T here w as a noth er in te re stin g P yC on 2 017 p re se nta tio n
about th e G lo bal In te rp re te r
Lock (G IL ). In th eory , g ettin g rid o f th e G IL
would b e s o g re at: w e c o uld r u n P yth on
th re ads o n s e para te c o re s.
Oliv er S ch oen born : 'I n t h eo ry , g ettin g r id o f t h e G IL w ould b e s o
gre at.'
But th e G IL so lv e s a ve ry p ra ctic a l p ro ble m : syn ch ro niz in g a cce ss to
Pyth on d ata s tr u ctu re s.
You s ta rt d ig gin g in to th e G IL b y a naly zin g w hat
would b e n ece ssa ry , a nd w hat w ould
be th e g ain v e rs u s th e c o st. Y ou
re aliz e th at th e G IL re ally s im plif ie s a lo t o f th in gs
and m ay w ell b e a
re aso n th at it 's s o e asy to d o c o m plic a te d th in gs w it h P yth on.
You c a n b asic a lly g et c o ncu rre nt p ro gra m min g, w it h out a ll th e c a tc h es o f
mult i- th re aded
pro gra m min g. M ost o fte n in a la rg e cla ss o f p ro ble m s,
th at's w hat y o u w ant. In th e
oth er c la ss o f p ro ble m s, y o u w ant to ta ckle
tr iv ia lly p ara lle liz a ble p ro ble m s. It's
basic a lly w here y o u a re s u bdiv id in g

th e s o lu tio n in to ta sks. T here 's v e ry lit tle c o uplin g
betw een th e ta sks a nd
yo u c a n d o it v e ry e asily .
Monte C arlo is o ne e xa m ple b eca use it 's v e ry im porta nt in s im ula tio n a nd
busin ess
pro ce sse s. Y ou b asic a lly w ant to ru n a la rg e n um ber o f th in gs
many tim es, w it h v e ry
lit tle v a ria tio n b etw een th em . P yth on m ake s th at
easy to o.
For tr iv ia lly p ara lle liz a ble p ro ble m s, y o u n eed to ru n th ose . Y ou c a n ru n
th em on
se para te co re s, ju st usin g a m ult ip ro ce ssin g m odule . Yes,
th ere 's e ve n th at c a pabilit y !
So m any d if f e re nt th in gs th at a re c o m ple x in
prin cip le , a re s im ple in P yth on, w hic h
make s it s o u sa ble fo r n um ber
cru nch in g ta sks.
Oliv er S ch oen born : 'S o m an y d if f e re n t t h in gs t h at a re c o m ple x in
prin cip le , a re s im ple
in P yth on.'
But I d o th in k th at th ere s h ould b e a n e asie r w ay to ru n P yth on c o de o n
mult ip le co re s
wit h out havin g to use th e m odule . There sh ould be
la nguage c o nstr u cts th at w ork h and
in h and w it h th e G IL . T here is n o
te ch nic a l in fe asib ilit y th ere ; it 's ju st th at th ere
has to b e e nough c o nce rte d
eff o rt to m ake it h appen.
Dris co ll
: W hat a re y o u m ost
excit e d a bout in P yth on to day?
Sch oen born
: T he o ptio nal ty p e a nnota tio n s yste m , a syn ch ro nous c a lls ,
and th e m ult ip ro ce ssin g
module .
Dris co ll
: W hic h la nguage is P yth on's b ig gest c o m petit o r w ould y o u s a y?
Sch oen born
: Ja va S crip t. It's ju st so unfo rtu nate th at Ja va S crip t
dom in ate s th e w eb s id e o f th in gs.
There a re th ese tw o m ajo r c o nte nders :
Ja va S crip t o n th e w eb a nd P yth on in te ch nic a l
co m putin g. If y o u re ally
need th e r a w c o m pute s p eed, th en y o u c a n d o C ++.
You c a n g et m ajo r s p eedups in P yth on, b y w rit in g s o m e C ++ c o de a nd
in gestin g it in
Pyth on v ia S W IG a nd S IP . T here is a ls o C yth on. It's s o
easy to w ork a t a h ig h le ve l
of a bstr a ctio n w it h P yth on, w it h th at c o m pute

pow er w hen y o u n eed it fr o m C ++.
I d on't k n ow w here th at's g oin g to g o. I th in k th at a lo t o f th in gs w ould
have to
happen o n th e J a va S crip t s id e to m ake it a s p ow erfu l a nd a s
sim ple to u se a s P yth on,
but o n th e o th er h and, I ca n't se e P yth on
beco m in g a s u pporte d la nguage in th e w eb
bro w se r, b eca use J a va S crip t
is ju st to o e sta blis h ed. M ayb e if G oogle d ecid es to m ake
Pyth on c o de
ru nnable fr o m C hro m e.
Oliv er S ch oen born : 'A lo t o f t h in gs w ould h ave t o h ap pen o n t h e
JavaS crip t s id e t o
make it a s p ow erfu l a n d s im ple t o u se a s P yth on.'
Dris co ll
: S o is P yth on h ere to s ta y?
Sch oen born
: I th in k th at P yth on is h ere to s ta y. P yth on is to o g ood a
la nguage and it s co m munit y
has deve lo ped good qualit y and so lid
lib ra rie s, a nd la nguage e vo lu tio n p ro ce sse s v ia
PEPs. T here is a v e ry
rig oro us p ro ce ss fo r P yth on a nd a lo t o f s m art p eople w ork in g
on it . S o
it 's h ere to s ta y fo r s u re .
Dris co ll
: W hat d o y o u th in k a bout th e lo ng lif e o f P yth on 2 .7 ? S hould
people m ove o ve r to
th e la te st v e rs io n?
Sch oen born
: The lo ng lif e
of Pyth on 2.7 is m ost ir rit a tin g! Big
in flu ence rs , lik e U buntu a nd G oogle C lo ud P la tfo rm ,
must s ta rt m akin g
Pyth on 3 .6 th eir d efa ult .
Oliv er S ch oen born : 'T he lo ng lif e o f P yth on 2 .7 is m ost ir rit a tin g!'
Dris co ll
: W hat c h anges
would y o u lik e to s e e in fu tu re P yth on r e le ase s?
Sch oen born
: I w ould lik e to s e e a n o ptio nal s ta tic ty p in g s yste m w it h
ty p e in fe re nce (s o ty p es
do n ot n eed d ecla ra tio n), tr u e p ara lle lis m , a nd
an o ptio nal c o m pila tio n m ode.
The c o m bin atio n o f o ptio nal s ta tic ty p in g, c o m pila tio n, a nd ty p e in fe re nce

would a llo w
th e la nguage to s ta y s im ple w hen s ta rtin g, a nd g et m ore
rig oro us w hen n eeded.
It c o uld a ls o p ro vid e m assiv e g ain s in s p eed a nd p ro ductiv it y : it 's a lw ays
a tim e
sa ve r to b e a ble to p oin t to a ny o bje ct a nd k n ow e xa ctly w hat
opera tio ns a re e it h er
ava ila ble o n it , o r re quir e d o f it (w it h in a fu nctio n
sig natu re ). R ealis tic a lly , I
don't k n ow if a c o m pila tio n m ode ( e ve n J IT ) th at
fr e eze s ty p es is fe asib le , b ut th ere
are s o m e in cre dib ly s m art p eople o ut
th ere , s o I w ould n ot d is co unt it .
Wit h r e gard s to p ara lle lis m , I'm r e fe rrin g to th e a bilit y to r u n P yth on c o de
on m ult ip le
co re s s im ult a neously , w hile k e epin g th e G IL . S ure , th ere is
th e m ult ip ro ce ssin g m odule ,
but I'm ta lk in g a bout c o nstr u cts b uilt in to th e
la nguage it s e lf a s fir s t- c la ss c it iz e ns.
Dris co ll
: T hank y o u, O liv e r S ch oenborn .

C hap te r 1 6. A l S w eig art
A l S w eig art
is a n A m eric a n s o ftw are d eve lo per a nd th e c re ato r o f tw o
c ro ss-p la tfo rm P yth on m odule s:
Pyp erc lip , fo r
co pyin g a nd
pastin g te xt,
a nd PyA uto G UI, fo r co ntr o llin g th e m ouse and ke yb oard . H e is a
s u cce ssfu l
auth or w ho h as p ublis h ed fo ur b ooks o n P yth on p ro gra m min g
a nd a b ook o n S cra tc h , a
pro gra m min g la nguage fo r c h ild re n. A l's b ooks
t e ach b egin ners h ow to c o de a nd h e is
passio nate a bout h elp in g y o ung
p eople a nd a dult s to d eve lo p p ro gra m min g s kills . A l
fo cu se s o n m akin g
p ro gra m min g k n ow le dge m ore a cce ssib le a nd r e gula rly s p eaks a t P yth on
c o nfe re nce s.
Dis cu ssio n t h em es: P yth on b ooks, P yth on p ackag es, v 2.7 /v 3.x .
Catc h u p w it h A l S w eig art h ere : @ AlS w eig art
M ik e D ris co ll
: S o h ow d id
yo u b eco m e a p ro gra m mer?
A l S w eig art
: I w as a k id w ho lo ve d th e 8 -b it N in te ndo. T hen a fr ie nd o f
m in e fo und a b ook in
th e e le m enta ry s ch ool lib ra ry a bout p ro gra m min g
g am es in B ASIC . I w as h ooke d.
I s o rt o f h ate te llin g p eople h ow I g ot in to p ro gra m min g, b eca use I w as
o ne o f th ose
people w ho s ta rte d w hen th ey w ere a y o ung k id . I w orry th at
t e llin g m y s to ry m ake s
people th in k, " O h n o, I h ave n't
been p ro gra m min g

sin ce I w as th re e w eeks o ld , s o it 's to o la te fo r m e. I'l l n eve r
ca tc h u p!"
Al S w eig art: 'I f a n yth in g, p ro gra m min g h as b eco m e s o m uch e asie r
th an it w as 2 0 y ears
ag o.'
If a nyth in g, p ro gra m min g h as b eco m e s o m uch e asie r th an it w as 2 0
ye ars a go. W e d id n't
have W ik ip edia a nd S ta ck O ve rflo w b ack th en. I
th in k e ve ry th in g th at I le arn ed a bout
pro gra m min g betw een th e th ir d
gra de a nd g ra duatin g h ig h s ch ool, a nyb ody c o uld n ow
le arn in a bout a
doze n w eeke nds.
Most o f m y p ro gra m min g k n ow le dge w as d ra w n fr o m th at o ne b ook. I
tr ie d to m ake s e nse
of th e re fe re nce m anual th at c a m e w it h m y fa m ily 's
Com paq 3 86 c o m pute r. I c o uld n't
unders ta nd th at m anual a t a ll. I e nded
up n eve r m akin g a nyth in g a s im pre ssiv e a s th e
Nin te ndo g am es I p la ye d.
Dris co ll
: S o
h ow d id y o u e nd u p m ovin g in to P yth on it s e lf ?
Sw eig art
: I fir s t p ic ke d u p P yth on a ro und 2 004. I w as lo okin g a t m akin g
so m e w eb a pps, a nd
I w as m ostly p ro gra m min g in P H P a nd P erl, w hen a
fr ie nd p oin te d o ut P yth on to m e.
At th at tim e, I w ante d to le arn a s m any d if f e re nt p ro gra m min g la nguages
as I c o uld ,
and P yth on w as re ally n ic e . I lo ve d th e re adabilit y o f th e
la nguage. E ve ry th in g th at
I u se d to d o in P erl, I s ta rte d d oin g in P yth on. I
neve r fo und a p ro gra m min g la nguage
th at I lik e d b ette r a fte r th at, s o I
ju st s tu ck to P yth on a nd n ow it 's b een o ve r a
deca de.
I s o m etim es fe el th at I n eed to a ctu ally fo rc e m yse lf to le arn d if f e re nt
pro gra m min g
la nguages, ju st to s ta y o n to p o f th in gs. B ut P yth on h as
beco m e m y g o-to la nguage.
Wheneve r I h ave to w rit e a q uic k s crip t o r
auto m ate s o m e r e ally s h ort ta sk, it 's e asy
to u se P yth on.
Then a gain , it 's re ally h ard to p re dic t th e fu tu re a nd I'v e s to pped tr y in g.
For in sta nce ,
I r e ally th ought th at s o m eth in g w ould c o m e a lo ng to r e pla ce
Ja va S crip t, b ut if a nyth in g,
it 's ju st g ettin g m ore p opula r! T hat, a nd I
orig in ally th ought th at in clu din g c a m era s
in c e ll p hones w as a s illy id e a.
So I'v e le arn ed n ot to tr y to p re dic t th e fu tu re .

Al S w eig art: 'I t 's r e ally h ard t o p re d ic t t h e f u tu re a n d I'v e s to pped
tr y in g.'
Dris co ll
: P yth on is
pla yin g a m ajo r ro le in th e A I a nd m ach in e le arn in g
boom . C an y o u e xp la in th at?
Sw eig art
: W ell, n ot to
fa w n o ve r P yth on to o m uch , b ut w hat m ake s
Pyth on g re at fo r A I a re th e th in gs th at
make it g re at a s a la nguage in
genera l.
Al S w eig art: 'W hat m akes P yth on g re at f o r A I a re t h e t h in gs t h at
make it g re at a s
a la n guag e in g en era l.'
Pyth on is easy to le arn and easy to use . It tu rn s out th at fo r m ost
applic a tio ns th is
is w hat's im porta nt. "P ow erfu l" is a m eanin gle ss te rm
when it co m es to pro gra m min g
la nguages, beca use eve ry la nguage
describ es it s e lf a s " p ow erfu l" .
Theore tic a lly , th ere 's no ca lc u la tio n th at one la nguage ca n do th at
anoth er la nguage
ca n't . In pra ctic e th ough, yo u need a hum an
pro gra m mer to ta ke th e tim e to s it d ow n
and w rit e th e a ctu al c o de. A
la nguage th at m ake s th at easy to do is th e one th at w ill
se e m ore
adoptio n, a la rg er c o m munit y , a nd m ore lib ra rie s. S o it d oesn 't s u rp ris e
me th at P yth on ta ke s th e le ad in s o m eth in g lik e m ach in e le arn in g, w here
so m any o f
th e to ols w ere d eve lo ped r e ce ntly .
Dris co ll
: W hat m ade y o u d ecid e to s ta rt
a ctu ally w rit in g b ooks a bout th e
Pyth on la nguage?
Sw eig art
: In 2 008, m y g ir lf r ie nd w as a n anny fo r a 1 0-y e ar-o ld k id . H e
wante d to le arn h ow
to p ro gra m , b ut h e d id n't r e ally k n ow w here to s ta rt. I
tr ie d to fin d s o m eth in g o n
th e w eb fo r h im , b ut s o m uch o f th e c o nte nt
back th en w as a im ed a t p ro fe ssio nal s o ftw are
deve lo pers .
So I s ta rte d w rit in g a tu to ria l, w hic h e ve ntu ally b eca m e
In ve nt Y our O wn
Com pute r G am es w it h P yth on
. I did n't w ant to bury th e re ader w it h
pro gra m min g co nce pts a nd te ch nic a l ja rg on.
I ju st w ante d to lis t th e

so urc e c o de to a g am e a nd th en e xp la in h ow it s c o de w ork e d.
I k e pt
addin g m ore g am es a nd e ve ntu ally it b allo oned in to b ook le ngth . I s e lf -
publis h ed
it , but als o put it on th e w eb fo r fr e e under a C re a tiv e
Com mons lic e nse . P eople s e em ed
to lik e it , s o I w ent o n to w rit e
Makin g
Gam es w it h P yth on a nd P yg am e
.
There 's a lit tle
c ip her p ro gra m in
In ve nt Y our O wn C om pute r G am es w it h
Pyth on
. I th ought p uttin g a b unch o f th ese c la ssic c ip hers to geth er w ould
make a g ood b ook.
I'd e xp la in n ot o nly h ow to w rit e c o de to p erfo rm th e
encry p tio n, b ut a ls o h ow to
bre ak th e e ncry p tio n. T hese c ip hers a re fr o m
ancie nt R om an tim es, u p to th e 1 6th c e ntu ry ,
so th e a ve ra ge la pto p to day
has m ore th an enough co m putin g pow er to bre ak th em . T hat
book
beca m e
Cra ckin g C odes w it h P yth on
.
Afte r I w ro te th at th ir d b ook, w rit in g tu rn ed in to w hat I d id w it h a ll o f m y
sp are
tim e. T here c a m e a p oin t w here I c o uld ta ke a c h ance , le ave th e
so ftw are d eve lo per
jo b th at I h ad, a nd w rit e fu ll- tim e. T hat w ork e d o ut
pre tty w ell.
Al S w eig art: 'I c am e u p w it h t h e r ig ht id ea f o r a b ook, a t t h e r ig ht
tim e, a n d a ls o
fo r t h e r ig ht la n guag e.'
I th ought th at I'd g o b ack to a noth er d eve lo per jo b a fte r a y e ar o r s o o f
writ in g,
but
Auto m ate th e B orin g S tu ff w it h P yth on
c o m ple te ly b le w m e
aw ay w it h it s s u cce ss. It w as m ostly lu ck. I c a m e u p w it h th e
rig ht id ea fo r
a b ook, a t th e r ig ht tim e, a nd a ls o fo r th e r ig ht la nguage. S o a lo t
of th in gs
ju st fe ll to geth er.
Dris co ll
: W hy d id y o u
decid e to s e lf - p ublis h ?
Sw eig art
: N o S ta rc h P re ss h ad a ppro ach ed m e a bout p ublis h in g
In ve nt
Your O wn C om pute r G am es w it h P yth on
, but th at pla n had fa lle n
th ro ugh.
I h ad th is h alf - e dit e d m anuscrip t, s o I fin is h ed e dit in g it a nd tu rn ed it in to
a P D F
to p ut o n A m azo n. A ll th e p ro m otio n I d id w as o nlin e. I'd te ll
people a bout it o n
fo ru m s. P eople d id n't s e e it a s s p am min g b eca use th e
PD F w as a ls o c o m ple te ly fr e e
to d ow nlo ad.

Dris co ll
: D o y o u th in k th at th e s u cce ss o f
In ve nt Y our O wn C om pute r
Gam es w it h P yth on
w as d ue to h avin g th e b ook a s a P D F, o r a s a w eb
page?
Sw eig art
: I s till th in k
p uttin g th e b ook o nlin e fo r fr e e, w it h a C re ativ e
Com mons lic e nse , le d to m ore p eople
buyin g th e b ook. P eople c o uld s e e
th e b ook a nd g enera te w ord o f m outh . T here w ere
oth er b enefit s to o.
Wit h th e b ook o nlin e, I c o uld ta ke a lo ok a t th e tr a ff ic a nd s e e
whic h
ch apte rs w ere g ettin g th e m ost a tte ntio n.
Al S w eig art: 'T he m ost p opula r c h ap te rs ...w ere o n G UI a u to m atio n,
web s cra p in g a n d
re g ula r e xp re ssio ns. S o w hen P yC on h ad c alls f o r
ta lk p ro posals , t h ose w ere t h e t o pic s
th at I c h ose.'
The m ost p opula r c h apte rs o n th e
Auto m ate th e B orin g S tu ff w it h P yth on
sit e w ere o n G UI a uto m atio n, w eb s cra pin g,
and r e gula r e xp re ssio ns. S o
when P yC on h ad c a lls fo r ta lk p ro posa ls , th ose w ere th e
to pic s th at I
ch ose . T hat's h ow I s ta rte d s p eakin g a t th e r e gio nal P yC ons a nd th en
at
US P yC on in 2 017.
I'v e n otic e d th at th e m ost p opula r to pic s in m y b ooks a re n ot a lw ays th e
stu ff th at
I th in k is th e m ost in te re stin g. I re m em ber th at w hen I w as
writ in g
Auto m ate th e B orin g S tu ff w it h P yth on
, I th ought th at th e c h apte r
on im age m anip ula tio n w ould be popula r. B ut it tu rn s
out th at m ost
people d on't n eed to g enera te th eir o w n im age file s fr o m P yth on s crip ts
as m uch a s I d o.
Al S w eig art: 'I 'v e n otic ed t h at t h e m ost p opula r t o pic s in m y b ooks
are n ot a lw ays
th e s tu ff t h at I t h in k is t h e m ost in te re stin g.'
Dris co ll
: W hat h ave y o u le arn ed
a s a n a uth or?
Sw eig art
: It's g oin g to b e m ore w ork th an y o u th in k! A lo t o f p eople e m ail
me a nd s a y, "O h
hey, I'm in te re ste d in w rit in g a b ook o n p ro gra m min g.
Do y o u h ave a ny a dvic e fo r m e?"

I d on't k n ow w hat to te ll th em . I'm a s o ftw are d eve lo per b y tr a in in g. I
kn ow w hat
I d id a nd th at m y a ppro ach w ork e d fo r m e. B ut th at's lik e a
lo tte ry w in ner a dvis in g
yo u o n w hic h n um bers to p ic k.
Auto m ate th e
Borin g S tu ff w it h P yth on
d id fa r b ette r th an m y o th er b ooks. I'm n ot r e ally
su re h ow w ell I c o uld r e pro duce
th ose r e su lt s fo r s o m eone e ls e .
My m ost r e ce nt b ook w as
Scra tc h P ro gra m min g P la yg ro und
, w hic h u se s
th e Scra tc h pro gra m min g to ol, fr o m th e M IT M edia Lab, to te ach
pro gra m min g
co nce pts to k id s. T hat b ook is d oin g m odestly w ell, b ut
unfo rtu nate ly th e a udie nce
fo r S cra tc h is n 't a s la rg e a s th e a udie nce fo r
Pyth on.
I d id le arn th at w rit in g is s o m eth in g y o u h ave to d o to g et b ette r a t it .
Actu al p ra ctic e
is b ette r th an a ny a dvic e I c o uld g iv e . A ls o , I le arn ed th at
good e dit o rs a re w orth
th eir w eig ht in g old .
Dris co ll
: S o w hat w ould y o u d o d if f e re ntly if y o u c o uld s ta rt o ve r w it h o ne
of y o ur o th er
books th at d id n't d o s o w ell?
Sw eig art
: I m ean, if w e'r e ta lk in g a bout th e fir s t b ook, th en m y b ig gest
mis ta ke w as n ot w rit in g
it fo r P yth on 3 . O rig in ally , I w as ju st u sin g P yth on
2, b eca use th at's w hat I k n ew .
I d id n't s ta rt q uestio nin g th at d ecis io n u ntil s o m eone s a id , " H ey, w hy d on't
yo u u se
Pyth on 3 ?" T here re ally w asn 't a p artic u la r re aso n n ot to , s o I
made th e s w it c h to
Pyth on 3 fo r
In ve nt Y our O wn C om pute r G am es w it h
Pyth on
. T hat tu rn ed o ut to b e a r e ally s m art th in g.
Al S w eig art: 'I m ad e t h e s w it c h t o P yth on 3 f o r In ven t Y our O wn
Com pute r G am es w it h
Pyth on. T hat t u rn ed o ut t o b e a r e ally s m art
th in g.'
Anoth er b ig m is ta ke w hen w rit in g
In ve nt Y our O wn C om pute r G am es
wit h P yth on
w as th at I orig in ally had th e entir e te xt ju st as H TM L,
beca use I w as m akin g it a s
a w eb tu to ria l in a te xt file . I w as w rit in g u nit
te sts and usin g lin tin g to ols ju st
to m ake su re th at eve ry th in g w as
fo rm atte d w ell. T hat tu rn ed o ut to b e a la rg e h eadach e.

What I s h ould h ave d one is u se M ic ro so ft W ord . A lo t o f p eople a re r e ally
su rp ris e d
when I te ll th em th at, b ut W ord a nd E xce l a re th e tw o b est
th in gs to c o m e o ut o f M ic ro so ft.
If I c o uld s e nd a m essa ge 1 0 y e ars b ack
in tim e, I'd te ll m yse lf to u se r e al d eskto p
publis h in g s o ftw are .
Dris co ll
: W hy d id yo u ch oose S cra tc h , ra th er
th an o ne o f th e o th er
ch ild re n's b egin ner la nguages?
Sw eig art
: Scra tc h is th e
best pro gra m min g to ol fo r kid s th at I'v e
enco unte re d. A lo t o f p ro gra m min g to ols
fo r k id s a re d um bed d ow n to th e
poin t th at I d on't fe el lik e th ey'r e a ctu ally te ach in g
pro gra m min g.
Scra tc h m ade a lo t of sm art desig n decis io ns and te ach es re al
pro gra m min g, w hile hid in g
th e m essy deta ils . E ve ry o ne in te re ste d in
te ach in g kid s to co de sh ould re ad th e S cra tc h
whit e p aper b y M it c h
Resn ic k a nd a ls o w atc h h is T E D ta lk .
Dris co ll
: S o I w ant to c h ange to pic h ere s lig htly . W hy d id y o u c re ate th e
Pyth on p acka ges
Pyp erc lip a nd P yA uto G UI?
Sw eig art
: P yp erc lip
and
PyA uto G UI b oth c a m e o ut
of n eeds th at c a m e
up w hile I w as
writ in g p ro gra m min g b ooks.
Al S w eig art: 'P yp erc lip a n d P yA uto G UI b oth c am e o ut o f n eed s t h at
cam e u p w hile I
was w rit in g p ro gra m min g b ooks.'
In
Cra ckin g C odes w it h P yth on
, yo u'r e dealin g w it h encry p tin g and
decry p tin g te xt. O fte n, y o u'r e w ork in g w it h a
lo t o f r a ndom n onse nse te xt
th at yo u need to re pro duce exa ctly , and havin g a co py-a nd-p aste
mech anis m m ake s th at m uch e asie r. It le ts th e u se r p ut th e o utp ut in to a n
em ail, o r
sa ve it in a d ocu m ent. S o I th ought, "W ell, h ow d o y o u c o py-
and-p aste te xt in P yth on?"
There w ere s o m e m odule s o n P yP I th at d id
co py-a nd-p aste , b ut th ey w ould o nly w ork
on o ne o pera tin g s yste m , o r
th ey o nly w ork e d fo r P yth on 2 .
I w ante d to h ave o ne m odule th at w ork e d o n a ll o pera tin g s yste m s, a nd
als o w ork e d
fo r P yth on 2 a n d P yth on 3 . A ll I n eeded w as a c o py fu nctio n
and a p aste fu nctio n.
I d id n't th in k it w ould tu rn o ut to b e m uch w ork , b ut

of c o urs e it w as. F ortu nate ly ,
th e u se r d oesn 't h ave to s e e a ll th e m essy
deta ils th at w ent in to m akin g P yp erc lip
work o n s o m any p la tfo rm s. T hey
only s e e a m odule w it h tw o fu nctio ns.
Dris co ll
: S o h ow d id y o u g et s ta rte d o n th is
id ea o f o ne m odule ?
Sw eig art
: I d id n't w ant re aders to h ave to d eal w it h p ic kin g d if f e re nt
module s d ependin g o n
what th eir c o m pute r s e tu p w as.
I co m bin ed all of th at co de in to one m odule , to beco m e P yp erc lip ,
beca use I notic e d
th at th ere was noth in g on PyP I th at did th at.
PyA uto G UI w as c re ate d fo r s im ila r re aso ns.
I w ante d to h ave a c h apte r
on G UI a uto m atio n fo r
Auto m ate th e B orin g S tu ff w it h P yth on
, b ut a ll th e
exis tin g m odule s on P yP I w ere fo r dif f e re nt opera tin g syste m s and
work e d
dif f e re ntly .
Al S w eig art: 'T he w ay t h at P yA uto G UI c am e a b out w as b ecau se o f
th is n eed t o h ave o ne
module t h at ju st w ork ed .'
The w ay th at P yA uto G UI c a m e a bout w as b eca use o f th is n eed to h ave
one m odule th at
ju st w ork e d. I th in k th at's th e m ain re aso n th at
PyA uto G UI is th e m ost p opula r o pen
so urc e p ro je ct th at I'v e e ve r s ta rte d.
It's u se fu l to a w id e r a nge o f p eople .
Dris co ll
: W hat d o yo u th in k sh ould b e th e g oal fo r
a nyo ne cre atin g
Pyth on p acka ges?
Sw eig art
: If y o u w ant to c re ate a P yth on p acka ge, o r a ny s o ftw are , th e
most im porta nt th in g
is th at it 's e asy to u se .
Al S w eig art: 'I f y o u w an t t o c re ate a P yth on p ackag e, o r a n y
so ftw are , t h e m ost im porta n t
th in g is t h at it 's e asy t o u se.'
Befo re I e ve n s ta rt w rit in g a ny c o de, I ju st ty p e o ut w hat th e A PI w ould b e
lik e a nd
how I w ould u se it m yse lf . I th in k a lo t o f p ro gra m mers ju st lik e
writ in g c o de a nd
so lv in g te ch nic a l p ro ble m s, b ut th ey d on't r e aliz e th at a ll

of th at is w orth le ss if
it 's to o c o m plic a te d fo r p eople to a ctu ally u se .
Al S w eig art: 'W hen s ta rtin g o ut, t h e a lg orit h m s y o u w rit e d on't h ave
to b e e le g an t.
You d on't e ven n eed t h e c o de t o b e p erfe ctly c le an .'
When s ta rtin g o ut, th e a lg orit h m s y o u w rit e d on't h ave to b e e le gant. Y ou
don't e ve n
need th e c o de to b e p erfe ctly c le an. A s lo ng a s u sin g th e
module is s im ple , th en th at's
what g ets p eople p ayin g a tte ntio n. O nce
yo u k n ow y o u'v e m ade s o m eth in g th at w ork s,
and th at p eople w ant, th en
yo u c a n c le an u p th e c o de fo r fu tu re d eve lo pm ent.
Al S w eig art: 'I 'm a lw ays t h rille d t h at m an y p eo ple u se P yp erc lip a n d
it is n 't ju st
a t o y t h at I c re ate d f o r m yself .'
I'm a lw ays th rille d th at m any p eople u se P yp erc lip a nd it is n 't ju st a to y
th at I
cre ate d fo r m yse lf . I'v e le arn ed a lo t a bout m akin g s o ftw are th at fit s
oth er people 's
needs. F or exa m ple , w it h P yA uto G UI, I re ce iv e d bug
re ports fr o m p eople w it h n on-E nglis h
ke yb oard s o r n on-E nglis h la nguage
se ttin gs. T hese w ere is su es th at I w ould h ave n eve r
th ought o f if I w as
th e o nly o ne u sin g m y c re atio n.
It's g iv e n m e a n a ppre cia tio n fo r ju st h ow m uch e ff o rt g oes in to m akin g
co de th at
is r o bust e nough fo r a w id e a nd d iv e rs e s e t o f u se rs . I'v e m ade
a fe w o th er o pen s o urc e
pro je cts , b ut P yp erc lip a nd P yA uto G UI a re th e
ones th at ta ught m e th e m ost a bout w rit in g
so ftw are fo r o th er p eople .
Dris co ll
: A re th ere a ny o th er m ajo r in sig hts th at yo u'v e le arn ed fr o m
opera tin g th ese p opula r
open s o urc e
p ro je cts ?
Sw eig art
: I'v e le arn ed th at, fo r th e m ost p art, p eople a re re ally n ic e . I'v e
heard so m e sto rie s
fr o m o pen so urc e m ain ta in ers a bout ru de p eople
dem andin g th at y o u fix th e b ug th ey'r e
enco unte rin g r ig ht th en a nd th ere .
But th e p eople I'v e c o m munic a te d w it h a re re ally
welc o m in g a nd e ve n-
handed a bout th eir c rit ic is m s. I r e ally a ppre cia te th at.
Dris co ll
: W hat a dvic e w ould y o u g iv e to
a nyo ne w ho is r e lu cta nt to s h are

th eir c o de o nlin e?
Sw eig art
: T he s o oner y o u p ut y o ur c o de o nlin e a nd g et p eople lo okin g a t
it , th e b ette r.
You h ave to g et o ve r th at fe ar o f c rit ic is m , b eca use I k n ow c o de re vie w s
have m ade
me a b ette r so ftw are d eve lo per m ore th an a nyth in g e ls e .
You'r e m is sin g o ut o n s o m any
opportu nit ie s to im pro ve if y o u d on't p ut
yo urs e lf o ut th ere , a nd y o u c a n a lw ays p ost
under a n a lia s a nyw ay.
Al S w eig art: 'T he s o oner y o u p ut y o ur c o de o nlin e a n d g et p eo ple
lo okin g a t it , t h e
bette r.'
It's a lo t lik e g oin g to th e g ym . S om etim es p eople g o to th e g ym a nd
th ey'r e w orrie d
th at e ve ry b ody e ls e is w atc h in g a nd ju dgin g th em . B ut th e
oth er p eople a t th e g ym
are to o b usy th in kin g a bout th em se lv e s to n otic e
th em . I th in k th e s a m e th in g a pplie s
to c o de. M ost p eople d on't a ctu ally
re ad yo ur co de. I'm pre tty su re th at m ost te ch nic a l
re cru it e rs w ho
co nta cte d m e, n eve r a ctu ally to ok th e tim e to g o th ro ugh th e h undre ds
of
lin es o f c o de th at I h ad o ut th ere a lr e ady.
I te nd to h ate a ny c o de th at I w ro te m ore th an tw o w eeks a go. I lo ok b ack
on it a nd
se e s o m any m is ta ke s a nd ro ugh e dges. A lo t o f p ro gra m mers
are lik e th at. If y o u'r e
worrie d th at y o ur c o de is to o u npolis h ed to p ost
onlin e, th en a t le ast y o u'r e in g ood
co m pany.
Dris co ll
: S o d o y o u h ave a ny
sp ecif ic a dvic e fo r s o m eone w ho w ants to
cre ate th e n ext b ig o pen s o urc e p acka ge in
Pyth on?
Sw eig art
: T here 's s o m eth in g
ca lle d th e N obel P riz e e ff e ct, w hic h is w hen
scie ntis ts w in a N obel P riz e a nd th en
th in k, "W hat c o uld I d o to w in a
se co nd N obel P riz e ? I n eed to w ork o n a n e ve n g re ate r
pro ble m ."
Then th ey s e t th eir s ig hts w ay to o h ig h a nd n eve r a cco m plis h a nyth in g
again . I so m etim es
fe el th at w ay about Pyp erc lip and PyA uto G UI
beca use I d id n't im agin e th ey w ould b eco m e
as p opula r a s th ey d id .
My G it H ub p ro file h as a to n o f o th er re pos th at n obody h as p aid m uch

atte ntio n to .
So m y a dvic e w ould b e to k e ep w ork in g o n d if f e re nt id eas
th at y o u h ave . It's re ally
hard to p re dic t w hat's g oin g to b eco m e p opula r.
This w as th e c a se w it h th e o pen s o urc e
pro je cts th at I'v e c re ate d, b ut
als o w it h th e books th at I'v e w rit te n. I re ally had
no id ea th at th e
su cce ssfu l th in gs th at I'v e w ork e d o n w ould b e s u cce ssfu l. M ost o f
th e
th in gs th at I'v e w ork e d o n h ave n ot b een s u cce ssfu l a t a ll.
Sta rt s m all a nd k e ep g ro w in g. L earn fr o m y o ur m is ta ke s a nd re aliz e th at
yo u w ill m ake
a lo t o f th em . P ut y o ur c o de o ut th ere fo r c rit ic is m a nd le arn
to w ork w it h o th ers ,
beca use a ll th e b ig o pen s o urc e p ro je cts a re m ade
by te am s, n ot b y in div id uals . I
th in k th at's p ro bably th e b est re cip e fo r
su cce ss.
Al S w eig art: 'A ll t h e b ig o pen s o urc e p ro je cts a re m ad e b y t e am s,
not b y in div id uals .'
Dris co ll
: W hat a re y o u m ost
e xcit e d a bout in P yth on to day?
Sw eig art
: It s e em s lik e w e'r e fin ally tu rn in g a c o rn er w hen it c o m es to
Pyth on 3 a doptio n
and fo r g ood r e aso n.
There have been eff ic ie ncy im pro ve m ents to se ve ra l pla ce s in th e
la nguage and m ost
nota bly to dic tio narie s in 3.6 (w hic h are at th e
fo undatio n o f m uch o f P yth on it s e lf ) .
The a syn cio m odule s e em s lik e it
co uld b eco m e a k ille r fe atu re . B ut m ostly I'm ju st
excit e d th at P yth on is
bein g use d by m ore people outs id e of so ftw are engin eerin g lik e
hobbyis ts , a ca dem ic s, a nd d ata s cie ntis ts .
Dris co ll
: W hat d o y o u th in k a bout th e lo ng lif e o f P yth on 2 .7 ? S hould
eve ry o ne m ove to P yth on
3 n ow ?
Sw eig art
: Y es, a bso lu te ly p eople
s h ould m ove to P yth on 3 . In 2 018, th e
excu se th at m odule s d on't s u pport P yth on 3
ye t is n 't tr u e a nd h asn 't b een
tr u e fo r y e ars .
The o nly re aso n to co ntin ue to u se P yth on 2 is if yo u h ave a la rg e
exis tin g c o debase
of P yth on 2 c o de, w hic h , s in ce P yth on h ad s o m uch
popula rit y e arly o n, is u nfo rtu nate ly
th e c a se fo r a lo t o f c o debase s. B ut I

fe el a t th is p oin t th at th ere 's b een to o m any
im pro ve m ents to P yth on 3
to
ig nore .
Al S w eig art: 'I f e el a t t h is p oin t t h at t h ere 's b een t o o m an y
im pro vem en ts t o P yth on
3 t o ig nore .'
The bette r handlin g of U nic o de str in gs w as th e se llin g poin t fo r m e
pers o nally . I'v e
se en a lo t o f co de th at ju st fa lls o ve r th e in sta nt th at
so m eone u se s n on-A SC II c h ara cte rs
in a s tr in g s o m ew here . I a lw ays
th ought it w as o dd th at th e v e rs io ns b efo re P yth on
3 w ere s o a w kw ard
when it c a m e to U nic o de c h ara cte rs , u ntil a fr ie nd p oin te d o ut th at
Pyth on
mostly p re date s U nic o de. It's e asy to fo rg et h ow lo ng P yth on h as b een
aro und.
Dris co ll
: S o w here d o yo u se e P yth on
goin g as a la nguage? W hat
fe atu re s do yo u se e co m in g in , or w hic h fie ld s do yo u se e
Pyth on
openin g u p in ?
Sw eig art
: P yth on lo oks o ut a t th e p ro gra m min g la ndsca pe a nd w eeps
beca use th ere a re n o m ore
world s to c o nquer.
Al S w eig art: 'P yth on lo oks o ut a t t h e p ro gra m min g la n dscap e a n d
weep s b ecau se t h ere
are n o m ore w orld s t o c o nquer.'
That's a n e xa ggera tio n, o f c o urs e . B ut it 's a m azin g h ow m any d if f e re nt
are as P yth on
is u se d in . It's a g re at g enera l s crip tin g la nguage, b ut it 's
als o u se d in m assiv e ly
sca le d s yste m s. It's u se d fo r w eb a pps, b ut a ls o
mach in e le arn in g. It's u se d b y th e
la rg est te ch c o m panie s, b ut a ls o in
hig h s ch ool c o m pute r s cie nce c la sse s.
I'm tr y in g to th in k a bout a re as w here P yth on h asn 't b een s o s u cce ssfu l.
Em bedded d evic e s
is o ne a re a, b ut M ic ro P yth on is a ddre ssin g th at a s
well. P yth on is a h ard s e ll fo r
tr ip le -A g am in g a nd V R , b ut it 's g re at fo r
hobbyis t g am e m ake rs a nd e ve n a fe w in die
gam e d eve lo pers . P yth on is
use d fo r w eb app backe nds, but Ja va S crip t is still th e
kin g of th e
fr o nte nd. I w ould lo ve to s e e P yth on in th e b ro w se r.

I'v e b een a b ig fa n o f th e c h anges in P yth on 3 , if a nyth in g ju st b eca use
Pyth on 3
got s tr in gs to fin ally w ork s e nsib ly . A lo t o f p ro gra m mers in th e
Englis h -s p eakin g
world fo rg et th at A SC II is n ot a u niv e rs a l c o de. In fa ct,
ASC II is n ot e ve n u niv e rs a l
in E nglis h -s p eakin g c o untr ie s. T he o rig in al
ASC II c h ara cte r s e t h as a d olla r s ig n,
but n ot a B rit is h p ound s ym bol.
Writ in g co de th at w on't
bre ak w hen so m ebody su bm it s a str in g w it h
acce nte d le tte rs is a h uge w in .
Al S w eig art: 'T he P yth on c o m munit y it s elf is t h e b est c o m munit y in
te ch t h at I'v e
ever f o und.'
What m ake s m e o ptim is tic a bout P yth on is n 't th e la nguage it s e lf , so
much a s th e p eople
behin d it . T he P yth on c o m munit y it s e lf is th e b est
co m munit y in te ch th at I'v e e ve r
fo und. T hey c a re a bout b ein g o pen a nd
in clu siv e , a nd th at a ttr a cts a lo t o f n ew b lo od
and fr e sh e ye s. S o I s till
th in k th at P yth on h as a lo t o f s te am , e ve n th ough it 's
been a ro und fo r
clo se to 3 0 y e ars n ow . I th in k th at P yth on is g oin g to b e re le va nt
and
stic kin g a ro und fo r q uit e s o m e tim e y e t.
Dris co ll
: T hank y o u, A l S w eig art.

C hap te r 1 7. L ucia n o R am alh o
L ucia no R am alh o
is a B ra zilia n s o ftw are e ngin eer a nd a fe llo w o f th e
P yth on Softw are Foundatio n (P SF). He is a te ch nic a l prin cip al at
T houghtW ork s, a d esig n s o ftw are c o m pany. L ucia no p re vio usly ta ught
P yth on web deve lo pm ent
in th e Bra zilia n bankin g, media , and
g ove rn m ent s e cto rs . H e is th e a uth or o f
Flu ent P yth on
a nd s e rv e d a s a
c o uncil m em ber fo r th e B ra zilia n P yth on A sso cia tio n fo r fo ur ye ars .
L ucia no re gula rly sp eaks a t in te rn atio nal P yth on co nfe re nce s. H e co -
o w ns P yth on.p ro .b r,
a tr a in in g c o m pany a nd c o -fo unded G aro a H acke r
C lu be, th e
fir s t h acke rs p ace in B ra zil.
Dis cu ssio n t h em es: P yth on b ooks, A PyB , v 2.7 /v 3.x .
Catc h u p w it h L ucia n o R am alh o h ere : @ ra m alh oorg
M ik e D ris co ll
: C ould yo u giv e a lit tle
backg ro und about yo urs e lf ,
L ucia no?
L ucia n o R am alh o
: S ure , I'm a s e lf - ta ught p ro gra m mer. I w as b orn in
B ra zil in 1 963. W hen I w as 1 5
ye ars o ld , in 1 978, I s a w th e L unar L ander
g am e
ru nnin g on a H P-2 5 ca lc u la to r and beca m e excit e d about th e
p ossib ilit ie s o f c o m bin in g
pro gra m mable c a lc u la to rs a nd b oard g am es,
w hic h w ere m y m ain g eek p assio n a t th e tim e.

Late r th at y e ar, m y fa th er's
em plo ye r g ave h im a T I- 5 8 c a lc u la to r, w hic h I
pro m ptly b orro w ed a nd n eve r re tu rn ed.
My fir s t in te re stin g p ro gra m w as
a p ort o f th e L unar L ander fr o m th e H P to th e T I
la nguage (b oth w ere
asse m bly -lik e la nguages).
In 1 981 I s p ent a y e ar a s a n e xch ange s tu dent in H arris b urg , IL , a nd I
was o ne o f
tw o v o lu nte ers th at ta ught o urs e lv e s to p ro gra m o n th e A pple
II c o m pute rs th at th e
hig h s ch ool lib ra ry h ad ju st r e ce iv e d; n o o ne e ls e in
th e s ch ool k n ew w hat to d o w it h
th em .
Afte r I c a m e b ack to B ra zil, m y fir s t jo b w as tr a nsla tin g A pple II s o ftw are
manuals
to P ortu guese , a nd m y s e co nd jo b w as te ach in g p ro gra m min g,
whic h b eca m e a lif e lo ng
passio n fo r m e.
Lucia n o R am alh o: 'M y s eco nd jo b w as t e ach in g p ro gra m min g,
whic h b ecam e a lif e lo ng
passio n f o r m e.'
Sin ce th en, I'v e s p ent a bout h alf o f m y tim e b ein g a p ro gra m mer a nd h alf
of m y tim e
bein g a te ach er. I w ork e d as a pro gra m mer fo r 8-b it
educa tio nal s o ftw are , C P/M s ta ndalo ne
busin ess a pps, W in dow s c lie nt-
se rv e r a pps, W in dow s a nd m acO S C D-R O M s, a nd o n b acke nd
syste m s
ru nnin g o n U nix fo r s o m e o f th e e arlie st w eb p orta ls in B ra zil.
I had a co uple of sm all co m panie s (a deskto p publis h in g bure au, a
so ftw are h ouse a nd
a tr a in in g c o m pany) a nd n ow I a m p ro ud to b e a
prin cip al c o nsu lt a nt a t T houghtW ork s.
To day, th e k in d o f p ro gra m min g th at I lik e to d o th e m ost, is e xa m ple
co de to illu str a te
new c o nce pts in la nguages, A PIs , a nd p la tfo rm s. I'm
ve ry in te re ste d in D X (d eve lo per
exp erie nce ) a s w ell. I re ally e njo y th e
ch alle nge o f c o din g th e s im ple st e xa m ple th at
ca n d em onstr a te a n id ea
and s till b e in te re stin g ( n ot ju st
foo
a nd
bar
a bstr a ctio ns). T hat's w hy I c a ll
myse lf
a s ta nd-u p p ro gra m mer
.
Dris co ll
: W hy d id y o u b eco m e a p ro gra m mer?
Ram alh o
: I b eca m e a p ro gra m mer b eca use I e njo y p ro gra m min g a s
much a s I e njo y p la yin g b oard
gam es.

I s e e a v e ry s tr o ng p ara lle l: th e k e yw ord s a nd fu nctio ns p ro vid ed b y a
la nguage a re
lik e th e p la yin g p ie ce s a nd o th er g am e re so urc e s a t y o ur
dis p osa l, w hic h yo u m ust
arra nge to a ch ie ve th e d esir e d e ff e ct. T he
la nguage s e m antic s a re lik e th e g am e ru le s.
If a la nguage h as s yn ta ctic
macro s, th en th at's lik e bein g able to cre ate co m ple te ly
new pie ce s
durin g a g am e - a v e ry p ow erfu l a bilit y .
Lucia n o R am alh o: 'I b ecam e a p ro gra m mer b ecau se I e n jo y
pro gra m min g a s m uch a s I e n jo y
pla yin g b oard g am es.'
Besid es b ein g fu n, p ro gra m min g
le ts u s h ave a
huge im pact in th e w orld ,
and I tr y to a lw ays h ave a p osit iv e im pact.
Dris co ll
:
Why P yth on?
Ram alh o
: I le arn ed m ore th an a
d oze n la nguages b efo re P yth on, a nd
I'v e s tu die d a t le ast h alf a d oze n a fte r it . B ut
Pyth on is th e o ne th at I'v e
use d fo r th e lo ngest tim e th ro ughout m y c a re er.
Pyth on fit s
my b ra in , a s th e s a yin g g oes. I fin d it e le gant y e t p ra ctic a l,
sim ple b ut n ot s im plis tic ,
co nsis te nt b ut n ot r ig id o r lim it in g. A fte r a w hile ,
I a ls o m ade m any fr ie nds in th e
Pyth on c o m munit y , s o th at b eca m e a
huge r e aso n to s tic k w it h it , e ve n w hen s o m etim es
I lo nged fo r s o m eth in g
dif f e re nt.
I s tu m ble d u pon P yth on in 1 998 w hen I w as le arn in g th e O O fe atu re s o f
Perl 5 , w hic h
I'd b een u sin g fo r w eb d eve lo pm ent. A t th e tim e, w heneve r
so m eone in th e P erl m ailin g
lis ts a ske d a bout th e O O-w ay o f d oin g
so m eth in g, co m paris o ns to P yth on ca m e u p. A fte r
tw o o r th re e su ch
mentio ns o f P yth on, I d ecid ed to lo ok it u p.
Lucia n o R am alh o: 'I r e ad G uid o v an R ossu m 's t u to ria l a n d f e ll in
lo ve w it h t h e la n guag e.
It c o m bin ed t h e b est q ualit ie s o f P erl a n d
Java.'
I re ad G uid o v a n R ossu m 's tu to ria l a nd fe ll in lo ve w it h th e la nguage. It

co m bin ed
th e b est q ualit ie s o f P erl a nd J a va , th e tw o la nguages th at I
was u sin g m ost a t th e
tim e. P yth on w as a
re al
O O la nguage w it h a
dece nt c la ss lib ra ry ,
lik e J a va , b ut it w as a ls o c o ncis e a nd p ra ctic a l, lik e
Perl, a nd m ore
re adable , c o nsis te nt, a nd p le asa nt to u se th an b oth . I
th in k th at P yth on is a m aste rp ie ce
of la nguage d esig n.
Dris co ll
: W hat d o y o u th in k m ake s P yth on s u ch a g ood la nguage fo r A I
and m ach in e le arn in g?
Ram alh o
: T he m ost im porta nt a nd
im media te re aso n is th at th e N um Py
and S ciP y lib ra rie s e nable p ro je cts s u ch a s s cik it - le arn ,
whic h is c u rre ntly
alm ost a d e fa cto s ta ndard to ol fo r m ach in e le arn in g.
The re aso n w hy N um Py, S ciP y,
scik it - le arn , a nd s o m any o th er lib ra rie s
were c re ate d in th e fir s t p la ce is b eca use
Pyth on h as s o m e fe atu re s th at
make it v e ry a ttr a ctiv e fo r s cie ntif ic c o m putin g. P yth on
has a s im ple a nd
co nsis te nt s yn ta x w hic h m ake s p ro gra m min g m ore a cce ssib le to p eople
who a re n ot s o ftw are e ngin eers .
Anoth er re aso n is opera to r ove rlo adin g, w hic h
enable s co de th at is
re adable a nd c o ncis e . T hen th ere 's P yth on's
buff e r p ro to co l (P EP 3 11 8),
whic h is a s ta ndard fo r e xte rn al lib ra rie s to in te ro pera te
eff ic ie ntly w it h
Pyth on when pro ce ssin g arra y-lik e data str u ctu re s. Fin ally , Pyth on
benefit s fr o m a r ic h e co syste m o f lib ra rie s fo r s cie ntif ic c o m putin g, w hic h
attr a cts
more s cie ntis ts a nd c re ate s a v ir tu ous c ycle .
Dris co ll
: W hat c o uld m ake P yth on a b ette r la nguage fo r A I a nd m ach in e
le arn in g?
Ram alh o
: T he b ig gest
ch alle nge fo r A I a nd
mach in e le arn in g p ro je cts in
Pyth on is d eplo yin g to p ro ductio n w it h a ll o f th e e xte rn al
dependencie s
re quir e d b y s u ch p ro je cts . C onta in ers h elp a lo t, b ut it 's n eve r e asy.
Dris co ll
: H ow d id y o u b eco m e a n a uth or, L ucia no?
Ram alh o
:
Flu ent P yth on
w as th e
fo urth b ook th at I s ta rte d, b ut th e fir s t
th at I fin is h ed. W rit in g a book ta ke s a
lo t of tim e an d it 's easy to
undere stim ate th e r e quir e d e ff o rt.
In 2 013, I s u bm it te d a ta lk p ro posa l
fo r O SC O N a nd w as a cce pte d. W hile

I w as a t th e c o nfe re nce , I a ppro ach ed th e O 'R eilly
booth w it h fo ur s lid es
of a p re se nta tio n o n m y iP ad: b ook tit le , a bout m e, a nd tw o
slid es o f
outlin e. T hey w ere in te re ste d and se nt m e th e te m pla te fo r a book
pro posa l.
A c o uple o f m onth s la te r, I h ad s ig ned a c o ntr a ct a nd g ot a
sm all a dva nce .
I w ork e d on th e book part- tim e in it ia lly . D urin g th at
tim e, M eghan
Bla nch ette , th e e dit o r, w as th e o nly p ers o n r e adin g it . S he g ave m e s o m e
ve ry v a lu able g uid ance , e sp ecia lly w it h th e flo w o f th e b ook.
About n in e m onth s in to th e p ro je ct, th e fir s t d eadlin e w as a ppro ach in g
and I w ould
not m ake it . T he O 'R eilly c o ntr a ct in clu ded a c la use th at
allo w ed a c o -a uth or to b e
im pose d if I h ad a p ro ble m d eliv e rin g. B ut
Flu ent P yth on
w as a v e ry p ers o nal p ro je ct fo r m e, s o I d ecid ed to q uit a ll
of m y o th er fr e ela nce
engagem ents a nd ju st fo cu s o n th e b ook.
I w ork e d fo r a noth er
nin e m onth s, p ro bably a ro und 5 0 h ours a w eek, a nd
fin is h ed it . D urin g th at s e co nd
half , th e te ch e dit o rs jo in ed th e p ro je ct.
The
re vie w ers were
all people th at I adm ir e : Ale x M arte lli, Anna
Rave nscro ft, L ennart R egebro , a nd
L eonard o R och ael. V ic to r S tin ner
fo cu se d o n th e c h apte r a bout a syn cio , w hic h w as
a n ew to pic fo r th e r e st
of u s. T hey a ll g ave m e a lo t o f e xce lle nt fe edback a nd
e nco ura gem ent.
Dris co ll
: W hat d id y o u le arn fr o m w rit in g
Flu ent P yth on
?
Ram alh o
: I le arn ed a lo t a bout P yth on. W hile w rit in g, I e xp lo re d p arts o f
th e s ta ndard lib ra ry
th at I h ad n eve r v is it e d b efo re .
I g ro kke d u niq uely P yth onic la nguage fe atu re s lik e a ttr ib ute d escrip to rs
and
yield from
e xp re ssio ns. I fin ally d is co ve re d w hy a P yth on p ro gra m
on W in dow s h as n o p ro ble m
prin tin g to c m d.e xe c o nso le , b ut c ra sh es
wit h
UnicodeEncodeError
w hen it s o utp ut is r e dir e cte d to a file .
I le arn ed a lo t m ore a bout P yth on. I a ls o le arn ed th e va lu e o f b ein g
yo urs e lf . B ein g
passio nate a bout a s u bje ct a nd k n ow in g it w ell a re g ood
fo undatio ns fo r c re atin g c o nte nt.
Lucia n o R am alh o: 'I a ls o le arn ed t h e v alu e o f b ein g y o urs elf . B ein g
passio nate a b out
a s u bje ct a n d k n ow in g it w ell a re g ood

fo undatio ns f o r c re atin g c o nte n t.'
I'm an avid re ader, w hic h is esse ntia l fo r w rit in g. I am als o ve ry
opin io nate d a bout
la nguage d esig n. A s a r e ader, I h ad b een a nnoye d b y
te ch nic a l a uth ors w ho m ix e d fa cts
and o pin io ns in th eir w rit in g, s o I c a m e
up w it h th e id ea o f th e S oapbox s e ctio ns
at th e e nd o f e ach c h apte r. I
co uld o ff e r m y o pin io ns, w hile a ls o m akin g it c le ar
to re aders th at th ey
co uld skip th at part. T he S oapboxe s w ere fu n to w rit e , and se ve ra l
re vie w ers e njo ye d th em a s w ell. S o th at's a n e xa m ple o f h ow b ein g
myse lf w ork e d v e ry
well.
The P yth on c o m munit y
is m ade u p o f p eople w ho lo ve to s h are w hat th ey
kn ow , and th ey dese rv e cre dit . S o
I ke pt note s of all th e im porta nt
re fe re nce s th at I u se d d urin g th e b ook, in clu din g
not o nly o th er b ooks,
but a ls o b lo g p osts , v id eos, a nd e ve n S ta ckO ve rflo w a nsw ers .
I s h are d
th ese n ote s w it h re aders in th e
Furth er R eadin g
s e ctio ns. T hat is a ls o a
fe atu re o f th e b ook th at s o m e r e vie w ers h ave p ra is e d.
Lucia n o R am alh o: 'T he P yth on c o m munit y is m ad e u p o f p eo ple
who lo ve t o s h are w hat t h ey k n ow , a n d t h ey d eserv e c re d it . S o I
kep t n ote s o f a ll
th e im porta n t r e fe re n ces.'
On a p ers o nal le ve l, w rit in g
Flu ent P yth on
a nd w it n essin g it s s u cce ss in
re vie w s a nd s a le s w as g re at fo r m y s e lf - e ste em , a fte r
I h ad fa ile d a t
writ in g a b ook o n th re e p rio r a tte m pts . S o I g uess o ne le sso n is th at
it
pays to p ers e ve re a nd g o a ll- in w hen y o u b elie ve in a p ro je ct.
Som e re aders h ave o ff e re d m e a
lo t o f g re at fe edback, a nd th e m ost
pro lif ic o f th em b eca m e a g ood
fr ie nd: E lia s D orn ele s. S o
anoth er le sso n
is th e im porta nce o f b ein g o pen to fe edback, a nd o ff e rin g p eople th e
opportu nit y to g iv e it .
Dris co ll
: W hat w ould y o u d o d if f e re ntly if y o u c o uld s ta rt o ve r?
Ram alh o
: I'd w rit e a s h orte r b ook! M y o rig in al p la n w as to w rit e 3 00
pages, b ut in th e e nd
it c a m e to 7 70.

Alt e rn ativ e ly , I c o uld h ave w rit te n fiv e s h orte r b ooks, b eca use e ach p art
of
Flu ent P yth on
fr o m II to V I w ork s p re tty w ell in dependently . B ut th e
re su lt in g v o lu m e s e t w ould
have b een m ore e xp ensiv e fo r re aders , a nd
perh aps w ould n ot h ave re su lt e d in th e s a m e
le ve l o f re co gnit io n a nd
sa le s.
I h ave n o r e gre ts , b eca use I'v e c o m e to b elie ve th at w hate ve r h appens is
th e o nly
th in g th at c o uld h ave . I le arn ed th is fr o m a uth or B ru ce E cke l, a s
one o f th e r u le s fo r o pen s p ace e ve nts .
Lucia n o R am alh o: 'W hate ver h ap pen s is t h e o nly t h in g t h at c o uld
have. I le arn ed t h is
fr o m a u th or B ru ce E ckel, a s o ne o f t h e r u le s f o r
open s p ace e ven ts .'
Dris co ll
: How did yo u end up
co -fo undin g th e
Bra zilia n Pyth on
Asso cia tio n?
Ram alh o
: T he B ra zilia n P yth on c o m munit y
g re w o rg anic a lly a ro und a
co uple o f m ailin g lis ts a nd a
w ik i c re ate d b y O sva ld o S anta na. I w as
alr e ady u sin g P yth on a s m y m ain la nguage,
and I h ad w rit te n a tu to ria l
fo r a m agazin e, b ut it w as O sva ld o's w ik i th at e nco ura ged
me to e ngage
wit h th e w id er c o m munit y .
Many o f u s w ould g et to geth er e ve ry y e ar a t F IS L, w hic h w as th e la rg est
FO SS c o nfe re nce
in B ra zil. It's in cre dib le h ow m eetin g fa ce -to -fa ce , a nd
goin g o ut fo r b eers , c a n
str e ngth en a c o m munit y th at s ta rte d o nlin e.
Lucia n o R am alh o: 'I t 's in cre d ib le h ow m eetin g f a ce-to -fa ce, a n d
goin g o ut f o r b eers ,
can s tr e n gth en a c o m munit y t h at s ta rte d
onlin e.'
Rodrig o S enra
org aniz e d th e fir s t
B ra zilia n P yth on c o nfe re nce , a nd J e an
Ferri th e s e co nd. R unnin g th ose c o nfe re nce s
wit h out a fo rm al s u pport
entit y w as d if f ic u lt : th e o rg aniz e rs c o uld n't s ig n c o ntr a cts ,
is su e in vo ic e s,
or c o lle ct s p onso rs h ip s in th e n am e o f a v a gue c o m munit y . S o a t o ne
FIS L, w e d ecid ed to c re ate th e B ra zilia n P yth on F oundatio n.

We fa ce d m onth s o f b ure aucra cy w hen w e le arn ed th at fo undatio n is a
re se rv e d w ord
under B ra zilia n la w . In ord er to be a fo undatio n, w e
needed a fiv e -y e ar pla n of actio n.
We needed so m e sta ff and an
endow m ent la rg e e nough to fu nd o ur s ta ff a nd a ll o f o ur
pla ns fo r a t le ast
fiv e y e ars . S o w e h ad to c h ange o ur p la ns a nd b eco m e th e m ore h um ble
Bra zilia n P yth on A sso cia tio n ( A PyB )!
In th e end, we su cce eded due to our pers e ve ra nce and th e
re so urc e fu ln ess o f D orn ele s
Tre m ea, o ur fir s t m anagin g d ir e cto r a nd m y
su cce sso r a s p re sid ent o f th e A PyB .
Dris co ll
: I'v e h eard s o m e p eople c h alle nge th e
va lu e o f A PyB . W hat's
yo ur r e sp onse to s u ch c rit ic is m ?
Ram alh o
: Y es, I k n ow th at s o m e p eople h ave q uestio ned th e u se fu ln ess
of A PyB , w hic h d oes
dem and s o m e tim e fr o m it s v o lu nte er p re sid ent a nd
dir e cto rs a fte r a ll. M y m ain a rg um ent
in th e d efe nse o f A PyB is th at w e
tr ie d d oin g w it h out it a nd it w as w ors e .
Dris co ll
: S o w hat
open s o urc e p ro je cts a re y o u w ork in g o n r ig ht n ow ?
Ram alh o
: A ctu ally , n one a t th is tim e! I d id s ta rt th e
pingo
p ro je ct, w hic h is
a d evic e -in dependent A PI fo r p ro gra m min g d evic e s w it h G PIO in te rfa ce s.
But I o nly m anaged to a ttr a ct L uca s V id o
a s a s o lid c o ntr ib uto r. B oth o f u s
got b usy w it h o th er th in gs, s o th e p ro je ct is
abandoned rig ht n ow . I'd lik e
to r e boot it , b ut I d on't k n ow w hen I'l l b e a ble to
do th at.
All o f th e c o de a nd
slid es fr o m m y c o nfe re nce ta lk s a nd tu to ria ls is o pen
co nte nt. I h ave o ve r 5 0 p re se nta tio ns
sh are d fo r
a nyo ne w ho w ants to
se e th em :
http s://s p eake rd eck.c o m /r a m alh o
. A ll o f th ese ta lk s a re a ls o o n
Git H ub in th e
/fluentpython organization
a nd in m y p ers o nal G it H ub
acco unt (
/ramalho
.)
I'v e s ta rte d w rit in g o pen c o nte nt fo r le arn in g G o. It's m ore lik e ly th at m y
next o pen
so urc e p ro je ct w ill b e a b ook o r s o m e o th er c o nte nt, ra th er
th an a pplic a tio ns o r lib ra rie s.
Dris co ll
: O h, th at's g re at th at y o u'r e th in kin g a bout w rit in g a noth er b ook!
So d o y o u h ave
any a dvic e
fo r a sp ir in g a uth ors ?

Ram alh o
: W ell, I'm n o e co nom is t, b ut I th in k th at w rit in g b ooks is ju st a s
lik e ly to p ay
yo ur b ills a s p la yin g th e g uit a r, s o d on't d o it fo r th e m oney,
but fo r th e lo ve o f
yo ur s u bje ct.
Als o , b e re ady fo r a v e ry lo ng jo urn ey. H ave s a vin gs, s o y o u c a n ta ke
so m e tim e o ff
ju st to w rit e if n eeded. T w o v e ry s u cce ssfu l a uth ors th at I
kn ow h ave to ld m e th at
most o f th e e xp erie nce s th at th ey h ave h ad w it h
co -a uth ors w ere b ad. S o I g uess th ere 's
no e asy w ay o ut o f th e lo ng a nd
mostly lo nely jo urn ey o f b ein g a n a uth or!
Dris co ll
: H ave y o u c o nsid ere d s e lf - p ublis h in g a t a ll?
Ram alh o
: Yes, I have , but w hile th ere
are se ve ra l se lf - p ublis h in g
alt e rn ativ e s, I th in k th at it 's w orth w hile to d o a t le ast
yo ur fir s t b ook w it h a
good p ublis h er if y o u c a n. T he fir s t re aso n is a ll o f th e s u pport
th at y o u
get fr o m a g ood e dit o r a nd y o ur te ch nic a l re vie w ers . T he s e co nd re aso n
is
th e r e co gnit io n th at y o u g et fr o m h avin g a w ell- k n ow n b ra nd p ro m otin g
yo ur w ork a nd
adorn in g it s c o ve r.
Dris co ll
: W hen y o u'r e w rit in g a b ook, d o y o u c re ate th e c o de b efo re y o u
sta rt w rit in g o r n ot?
Ram alh o
: I belie ve th at co de exa m ple s are th e heart of any
pro gra m min g b ook: y o u c a n't h ave
an e xce lle nt b ook w it h out e xce lle nt
exa m ple s. D avid G eary , th e
auth or o f th e c la ssic
Gra phic J a va
b ooks,
once w ro te th at w rit in g a p ro gra m min g b ook is e sse ntia lly c o m in g u p w it h
enlig hte nin g
exa m ple s, th en s u rro undin g th em w it h e xp la natio ns. I to ok
his a dvic e a nd it w ork e d
ve ry w ell fo r m e.
Lucia n o R am alh o: 'I b elie ve t h at c o de e xam ple s a re t h e h eart o f a n y
pro gra m min g b ook:
yo u c an 't h ave a n e xcelle n t b ook w it h out
excelle n t e xam ple s.'
So w hile th e hard est part fo r m e is ce rta in ly co m in g up w it h th e
exa m ple s, I h ad cre ate d
a lo t o f th e co de b efo re I sta rte d w rit in g. I
defin it e ly d id n't s ta rt w it h a n e m pty
te xt file a nd a b la nk s cre en!
Many o f th e e xa m ple s a nd e xp la natio ns th at a re in
Flu ent P yth on
a re

ones th at I'd deve lo ped ove r m ore th an 10 ye ars of te ach in g and
sp eakin g a bout
Pyth on. I d id a ls o c re ate m any m ore s p ecif ic a lly fo r th e
book, a nd in fa ct m any e xa m ple s
th at I n eve r u se d in th e b ook, b eca use
th ey e it h er b eca m e to o co m plic a te d, o r I h ad
th en th ought of bette r
exa m ple s.
Lucia n o R am alh o: 'H ere is a g re at le arn in g p oin t f o r a ll P yth on
te ach ers : w e m ust
le arn t o le t g o o f o ur e xam ple s a n d w rit in g.'
Here is a g re at le arn in g p oin t fo r a ll P yth on te ach ers : w e m ust le arn to le t
go o f
our e xa m ple s a nd w rit in g, w hen n ece ssa ry , n o m atte r h ow m uch
work w e'v e p ut in to th em .
So w hen, a s te ach ers a nd a uth ors , w e fin d a
bette r a ppro ach , o r w e re aliz e th at w e'v e
ju st g one to o fa r, th en it 's
im porta nt th at w e le t g o o f o ur e xa m ple s a nd m ove o n
fo r o ur r e aders .
I k n ow a lr e ady th at I w ill
tr y to d ro p e ve n m ore m ate ria l lik e th is w hen I
work o n m y n ext b ook. I a ls o th in k
about th is a s a te ach er. T he w rit e r a nd
avia to r A nto in e d e S ain t- E xu péry s a id in th e
co nte xt o f a ir p la ne d esig n:
"It s e em s th at p erfe ctio n is a tta in ed n ot w hen th ere is
noth in g m ore to
add, b ut w hen th ere is n oth in g m ore to r e m ove ."
Dris co ll
: W hat a re y o u m ost e xcit e d a bout in P yth on to day?
Ram alh o
: B esid es th e r u naw ay s u cce ss o f P yth on in d ata s cie nce , I a m
als o e xcit e d a bout th e
pote ntia l o f th e
async/await
k e yw ord s to e nable
asyn ch ro nous pro gra m min g, not only th ro ugh th e sta ndard
asyncio
lib ra ry , b ut a ls o th ro ugh th ir d -p arty lib ra rie s s u ch a s T rio .
Regard in g P yth on 3 .7 , th e
addit io n th at m ost e xcit e s m e is P EP 5 57
,
whic h in tr o duce s a s ta ndard w ay o f c re atin g c la sse s w it h e xp lic it d ata
attr ib ute s.
This is s o m eth in g th at lib ra rie s s u ch a s O RM s h ad to re in ve nt
re peate dly .
Dris co ll
: W hat d o y o u th in k a bout
Pyth on 2 .7 ? S hould p eople m ove to
th e la te st v e rs io n?
Ram alh o
: Yes, people sh ould to ta lly m ove
ove r to P yth on 3.6 . T he
la nguage is e vo lv in g n ic e ly a nd m ost lib ra rie s h ave b een
porte d fo r y e ars

now . H ow eve r, n ot e ve ry o ne c a n a ff o rd to m ake th e m ove .
Lucia n o R am alh o: 'Y es, p eo ple s h ould t o ta lly m ove o ver t o P yth on
3.6 . T he la n guag e
is e vo lv in g n ic ely a n d m ost lib ra rie s h ave b een
porte d f o r y ears n ow .'
The tr ic kie st p art is s o rtin g o ut th e is su e w it h
strings
v e rs u s
bytes
. T his
is a v e ry p osit iv e c h ange, b ut o ne th at c a n't b e a uto m ate d, b eca use in
Pyth on
2.7
strings
are so m etim es handle d as hum an te xt and
so m etim es a s
raw bytes
.
Dris co ll
: W hat c h anges w ould y o u lik e to s e e in fu tu re P yth on r e le ase s?
Ram alh o
: I'd lik e to s e e th e G lo bal In te rp re te r L ock (G IL )
g one, s o th at
we co uld le ve ra ge all pro ce sso r co re s w hen usin g
threads
fo r C PU
in te nsiv e w ork . U nfo rtu nate ly , th e la te st e ff o rt to d o s o , b y L arry H astin gs,
se em s to h ave s ta lle d in m id -2 017.
The m ain p ro ble m is th at
re m ovin g th e G IL w ould b re ak m ost (o r a ll,
dependin g o n w ho y o u a sk) e xte rn al lib ra rie s
th at re ly o n th e P yth on/C
API. O ne fa ct th at m ost p eople d on't re aliz e is th at w it h out
th e G IL ,
writ in g a n e xte nsio n fo r P yth on in a noth er la nguage w ould b e m uch m ore
co m plic a te d.
So, a lt h ough w e w is h th at th e G IL d id n ot e xis t, in r e alit y it is
a c o rn ers to ne o f
th e s u cce ss o f P yth on.
Eric S now , a
Pyth on c o re d eve lo per, w ro te th at th e G IL is m ore o f a P R
is su e. Y es, it is p ossib le
to w rit e h ig hly c o ncu rre nt I/O -b ound c o de u sin g
Pyth on
threads
or asyn ch ro nous lib ra rie s. B ut w hen su ch a pro je ct
gro w s, o r is h eavily s tr e sse d,
CPU -in te nsiv e b ottle necks e m erg e. T hose
bottle necks a re e xtr e m ely h ard to fin d in
th re aded c o de, b ut th ey s lo w
dow n e ve ry th in g b eca use o f th e G IL .
Mayb e o nly a fr a ctio n o f P yth on
p ro je cts is s e rio usly a ff e cte d b y th e G IL
to day, but C PU s are gettin g m ore co re s
and not gettin g fa ste r, so
le ve ra gin g m ult ip le co re s is beco m in g m ore and m ore im porta nt
( http s://m ail. p yth on.o rg /p ip erm ail/ p yth on-id eas/2 015-J u ne/0 34177.h tm l
o r
http s://lw n.n et/A rtic le s/6 50521/)
.

Dris co ll
: T hank y o u, L ucia no R am alh o.

C hap te r 1 8. N ic k C oghla n
N ic k C oghla n
is a n A ustr a lia n s o ftw are d eve lo per a nd s yste m s a rc h it e ct.
H is p ast ro le s in clu de
so ftw are e ngin eer a t B oein g A ustr a lia a nd s e nio r
s o ftw are e ngin eer a t R ed H at A sia
Pacif ic , a p ro vid er o f o pen s o urc e
s o lu tio ns. N ic k is a C Pyth on co re deve lo per and
BD FL-d ele gate fo r
P yth on p acka gin g in te ro pera bilit y s ta ndard s. H e is a fo undin g m em ber
of
t h e P yth on S oftw are Foundatio n (P SF)'s P yth on P acka gin g W ork in g
G ro up, a nd th e
fo under o f th e P yC on A ustr a lia E duca tio n S em in ar. O ve r
t h e past 20 ye ars , N ic k has
co ntr ib ute d to a ra nge of open so urc e
s yste m s a nd s o ftw are p ro je cts .
Photo c re d it s o f N ic k C oghla n
: © K ush al D as
Dis cu ssio n t h em es: c o re d evelo pers , P EPs, le arn in g P yth on.
Catc h u p w it h N ic k C oghla n h ere : @ nco ghla n _d e
M ik e Dris co ll
: W hat
made yo u decid e to beco m e a co m pute r
p ro gra m mer?
N ic k C oghla n
: O rig in ally , I ju st d id p ro gra m min g a s a p la yth in g a s a k id .
W e h ad th e g ood o ld
BASIC p ro gra m min g b ook fo r th e A pple IIe .
I t w asn 't u ntil I d id IT in m y fir s t y e ar o f h ig h s ch ool th at I d is co ve re d th at

co m pute rs
were a ctu ally a th in g y o u c o uld p la y w it h a s a jo b. T he s ch ool
th at I w ent to w as
one o f th e fir s t in th e s ta te to a ctu ally h ave a n IT c la ss.
So th at w as pre tty m uch
why I th en w ent in to co m pute r syste m s
engin eerin g a t u niv e rs it y .
My in it ia l fu ll- tim e
jo b out of univ e rs it y was em bedded syste m s
pro gra m min g in C , fo r a T e xa s In str u m ents
DSP. F ro m th ere , I e nded u p
doin g a lo t m ore s yste m s c o ntr o l a nd a uto m atio n s tu ff ,
whic h lo oks a lo t
more lik e p ro gra m min g th an it d oes e m bedded s o ftw are d eve lo pm ent.
So
it w as ju st th e c a se th at I e njo ye d p ro gra m min g, I w as g ood a t it , a nd y o u
ca n
make m oney fr o m it .
Dris co ll
: S o w hy
did y o u m ove in to P yth on?
Coghla n
: S o th e w ay th at I c a m e to P yth on is a ctu ally k in d o f in te re stin g,
beca use I w as
orig in ally a C /C ++ d eve lo per.
Nic k C oghla n : 'I w as t h e g uy w ho t h en r e p lie d , " C an w e u se a
dif f e re n t la n guag e in ste ad ?
I a lr e ad y k n ow J ava, a n d I'd lik e t o u se
Java." '
My o nly e xp osu re to P yth on a t u niv e rs it y w as fr o m a n etw ork in g le ctu re r
who sa id ,
"I'm g oin g to m ake yo u a ll d o th e a ssig nm ents in P yth on,
beca use I'm c o nfid ent th at
none o f y o u w ill k n ow it " . I w as th e g uy w ho
th en re plie d, "C an w e u se a d if f e re nt
la nguage in ste ad? I a lr e ady k n ow
Ja va , a nd I'd lik e to u se J a va ".
My le ctu re r s a id , " W ell, if y o u re ally w ant to u se J a va th en u se it , b ut tr y
Pyth on
fir s t" . S o I tr ie d P yth on 1 .5 .2 a nd it w as fu n.
Pro fe ssio nally , I w as w ork in g fo r a la rg e-s ca le s yste m in te gra to r h ere in
Austr a lia .
For th e D SP p ro gra m I w as w ork in g o n, m y te st s u it e w as a
re ally ru dim enta ry C p ro gra m ,
whic h w as a s u cce ss if it g ot to th e e nd
wit h out c ra sh in g.
We w ere ju st h avin g lo ts o f p ro ble m s w it h th e D SP c o de n ot w ork in g
pro perly w hen w e
got to th e n ext le ve l o f in te gra tio n te stin g. S o w e h ad a
huge a m ount o f b ehavio ra l
bugs g ettin g th ro ugh. W e d ecid ed th at w e

needed to w rit e a b ette r te st s u it e to fe ed
th e a udio in . It w as im porta nt to
ch eck th at w e w ere g ettin g th e a nsw ers w e w ere e xp ectin g
fr o m th e
actu al d ata a naly sis , n ot s im ply th at w e c o uld ta lk to th e D SP a nd a sk it
to d o th in gs r e m ote ly .
Nic k C oghla n : 'I t w as im porta n t t o c h eck t h at w e w ere g ettin g t h e
an sw ers w e w ere
exp ectin g f r o m t h e a ctu al d ata a n aly sis .'
We w ante d to
ch eck th e a ctu al s ig nal p ro ce ssin g it s e lf . W e a ls o re ally
did n't w ant to w rit e th at
in C a nd C ++. A noth er p art o f th e s yste m h ad
alr e ady had Pyth on appro ve d as a la nguage
fo r syste m co ntr o l
co m ponents . S o P yth on w asn 't b ein g u se d fo r c rit ic a l p ath s tu ff ,
but ju st
orc h estr a tin g a ll th e d if f e re nt b it s o f th e s yste m , a nd s ta rtin g th em w hen
th ey w ere s u ppose d to b e s ta rte d.
There w ere tw o m ain optio ns th at w e w ere lo okin g at fo r doin g th e
auto m ate d te stin g.
One o ptio n w as u sin g P yth on's
unittest
m odule , w it h
SW IG , to g enera te th e b in din gs to th e C ++ d riv e rs th at a ctu ally ta lk e d
to
th e D SP. T he a lt e rn ativ e w as th e in -h ouse C /C ++ te st fr a m ew ork th at w e
use d fo r
eve ry th in g e ls e . W e s e le cte d P yth on.
Dris co ll
: W hy d id y o u
c h oose P yth on?
Coghla n
: T he th in g w as th at P yth on h ad th e
unittest
m odule
to a ctu ally
org aniz e th e te stin g. P yth on h ad S W IG to tie to th e C ++ d riv e r. W e
co ntr o lle d
th e A PI o f th at d riv e r, s o m akin g it p la y n ic e ly w it h S W IG w as
str a ig htfo rw ard .
Then th e la st k e y p ie ce w as th at P yth on, in it s s ta ndard lib ra ry , h ad th e
wave m odule ,
to p la y W AV file s o ut o f th e P C . S o th at e sta blis h ed a tr e nd
fo r th at whole pro je ct,
whic h was Austr a lia 's Hig h Fre quency
Modern iz a tio n P ro je ct. P yth on ju st e nded u p k in d
of p ro lif e ra tin g th ro ugh
th at p ro je ct fo r a ll o f th e b it s th at w ere te stin g, m ockin g
and s im ula tin g
syste m in te rfa ce s fo r te stin g p urp ose s.
Dris co ll
: S o I k n ow th at a noth er A ustr a lia n h elp ed to c re ate p yw in 32. D id
yo u h ave a ny in vo lv e m ent
in th at p ro je ct?

Coghla n
: N o, I'v e o nly e ve r b een a
pyw in 32 u se r. T here a re a ctu ally lo ts
of A ustr a lia ns w ho h ave h is to ric a lly c o ntr ib ute d
to th e P yth on c o m munit y .
But beca use th ey have n't re ally been activ e in P yC on A ustr a lia ,
or
anyth in g lik e th at, I'v e n eve r a ctu ally m et th em !
Dris co ll
: W ell, le t's m ove o n. H ow d id y o u b eco m e a
co re d eve lo per fo r
th e P yth on la nguage?
Coghla n
: S o m y s h ort a nsw er to th is q uestio n is th at I b eca m e a c o re
deve lo per b y a rg uin g
wit h G uid o v a n R ossu m !
Nic k C oghla n : 'I b ecam e a c o re d evelo per b y a rg uin g w it h G uid o
van R ossu m !'
What a ctu ally
happened w as th at I'd b een o n U se net sin ce th e la te
1990s, and so I w as ve ry fa m ilia r
wit h th at w hole onlin e dis cu ssio n
fo rm at. A fte r I s ta rte d u sin g P yth on, I e nded u p
jo in in g th e o rig in al P yth on
mailin g lis t, a nd p artic ip atin g in d is cu ssio ns th ere .
I d is co ve re d th at P yth on-D ev w as a th in g a nd s ta rte d lu rk in g o n th at,
orig in ally w it h
th e in te ntio n ju st to lis te n to w hat p eople w ere ta lk in g
about. I a ctu ally s ta rte d
partic ip atin g a ctiv e ly in d is cu ssio ns a nd p ostin g
as w ell. T he fir s t c o ntr ib utio n
th at I c a n r e m em ber a ctu ally m akin g w as in
dis cu ssio ns o n th e P yth on lis t.
It w as v e ry c o m mon to u se th e
timeit
m odule
to tim e s n ip pets o f c o de
and s a y, " O h th is is fa ste r th an th at." A t th at p oin t, if
yo u w ante d to tim e
th e s n ip pets b etw een tw o d if f e re nt v e rs io ns, y o u h ad to fin d w here
th e
timeit
m odule w as in a p artic u la r v e rs io n o f th e s ta ndard lib ra ry .
We s a id , "H ang o n! P yth on a lr e ady k n ow s w here th e
timeit
m odule is .
Why a re w e h avin g to te ll P yth on w here to fin d it ? " S o th at e nded u p
beco m in g
a p atc h to a dd th e in it ia l v e rs io n o f th e - m s w it c h in P yth on 2 .4 .
I th in k R aym ond
Hettin ger re vie w ed th at. T his in it ia l v e rs io n o f P yth on
co uld only do to p-le ve l module s
and co uld n't do packa ges or
su bm odule s. T hen fin ally b y th e tim e w e re ach ed P yth on
2.7 , th e -m
sw it c h a ctu ally w ork e d p ro perly a nd d id a ll th e th in gs y o u w ould e xp ect
of
it .

Nic k C oghla n : 'F in ally b y t h e t im e w e r e ach ed P yth on 2 .7 , t h e - m
sw it c h a ctu ally w ork ed
pro perly .'
Som eth in g e ls e in te re stin g h appened in la te 2 004. A fte r a m ajo r c ru nch
perio d a t w ork ,
I to ok a le ave o f a bse nce o f th re e m onth s. I e nded u p
help in g o ut R aym ond a nd F acu ndo
Batis ta w it h th e in it ia l p erfo rm ance
enhance m ents o n th e P yth on d ecim al m odule . W e
were lo okin g a t w hat
we c o uld d o to m ake th e m odule fa ste r.
Dris co ll
: D id y o u fin d a w ay to s p eed th in gs u p?
Coghla n
: T here w as a ctu ally a n e ve ntu al s o lu tio n s e ve ra l y e ars la te r, b ut
in th ose e arly
days, th ere w as lo ts o f b ench m ark in g to s a y, " H ow fa st c a n
we m ake th is ju st a s a
pure P yth on th in g?"
Nic k C oghla n : 'T here w as lo ts o f b en ch m ark in g t o s ay, " H ow f a st
can w e m ake t h is ju st
as a p ure P yth on t h in g?"'
There w as a g lo rio us h ack th at I re m em ber fr o m th ose d ays. W e m ade
th e d is co ve ry th at
in p ure P yth on, if y o u h ave a tu ple o f d ig it s th at y o u
would lik e to tu rn in to a d ecim al
num ber, th en th e fa ste st co nve rs io n
mech anis m th at C Pyth on it s e lf o ff e rs is to c o nve rt
all th e d ig it s to s tr in gs,
co nca te nate th e s tr in gs, a nd th en u se
int
to c o nve rt th e c o nca te nate d
str in g b ack to a n um ber.
This is b eca use th e s tr in g
int
co nve rs io ns h ave b een o ptim iz e d to a
poin t w here d oin g th at is fa ste r th an d oin g
all th e m ult ip lic a tio n and
addit io n opera tio ns as Pyth on co de. In C , of co urs e , yo u
do th e
arit h m etic . O ur fin din gs re ally a nnoye d th e P yP y d eve lo pers . F ro m th eir
poin t
of vie w , d oin g th e a rit h m etic w as a lo t b ette r, b eca use th e JIT
work e d. S o th is m eant
th at th eir
decimal
m odule
w as s lo w er th an th ey
lik e d.
I th in k th at I b egan g ettin g in vo lv e d in d is cu ssio ns ju st a fte r P yth on 2 .3
ca m e o ut.
One o f th e p opula r p astim es w as m akin g fu n o f th e e xte nded
slic e s yn ta x. Y ou h ad th e
re ve rs e s m ile y o f o pen b ra cke t, c o lo n, c o lo n,
-1 , a nd clo se b ra cke t, to re ve rs e a
se quence . T his w as lo ng b efo re

reversed
o r a nyth in g lik e th at.
reversed
b eca m e a th in g b eca use it tu rn ed o ut th at g ettin g th e a rit h m etic
rig ht fo r r e ve rs in g
a s lic e w as a ctu ally q uit e tr ic ky. It w as ju st r e ally p ro ne
to o ff - b y-o ne e rro rs if
yo u d id it m anually . S o a ddin g in re ve rs e d m ade
th in gs e asie r to r e ad.
Dris co ll
: W hat d o y o u th in k a bout th e lo ng lif e
o f P yth on 2 .7 ? S hould
people m ove o ve r to th e la te st v e rs io n?
Coghla n
: W e d elib era te ly s e t th e s u pport p erio d o f P yth on 2 .7 s u ch th at
exis tin g use rs co uld
make th eir ow n decis io n about when th ey
co nsid ere d th e P yth on 3 e co syste m to b e s u ff ic ie ntly
matu re fo r th em to
sw it c h o ve r.
Nic k C oghla n : 'W e d elib era te ly s et t h e s u pport p erio d o f P yth on 2 .7
su ch t h at e xis tin g
users c o uld m ake t h eir o w n d ecis io n.'
Folk s th at h ad p ers o nally fe lt th e p ain o f P yth on 2 .7 's lim it a tio ns m ig ra te d
early ,
so w e'r e n ow a t th e p oin t w here m ost o f th e fo lk s th at a re s till to
mig ra te a re e it h er
lo okin g fo r b ette r to ols to h elp th em w it h th at p ro ce ss,
or a re s im ply p la nnin g to
su nse t a ff e cte d p ro je cts a nd p ro ducts a lo ng
wit h P yth on 2 .7 .
On th e to olin g fr o nt, o ne o f th e im porta nt u se c a se s fo r P yth on 3 's ty p e
hin tin g m ach in ery
is to a llo w fo lk s to s ta tic a lly c h eck fo r P yth on 3 ty p e
co rre ctn ess e rro rs , e ve n if
th eir a uto m ate d te st co ve ra ge is lo w . T his
gre atly e xp ands th e s co pe o f c o de w hic h
ca n b e r e lia bly m ig ra te d.
Dris co ll
: W hat c h anges w ould y o u lik e to s e e in
fu tu re P yth on r e le ase s?
Coghla n
: I'd lik e to s e e b ette r to ols fo r w ork in g w it h p artia lly s tr u ctu re d
hie ra rc h ic a l
data , b ut in a w ay th at p re se rv e s P yth on's re puta tio n a s
exe cu ta ble pse udo co de. I'd
als o lik e to co ntin ue re ducin g th e
dis cre pancie s b etw een w hat c a n b e d one w it h e xte nsio n
module s, a nd
what s p ecif ic a lly r e quir e s a P yth on s o urc e m odule .
Fin ally , I'd lik e to s e e b ette r
su pport fo r p ro te cte d m em ory m anagem ent

models , w here ra th er th an a im in g to s e rv e
as a s e cu rit y b oundary , w e'r e
in ste ad p ro vid in g m em ory s e para tio n a s a w ay to a ssis t
wit h m ain ta in in g
th e co rre ctn ess of co ncu rre nt co de. C Pyth on's su bin te rp re te r fe atu re
alr e ady p ro vid es th is to s o m e d egre e, b ut th at c a pabilit y c u rre ntly h as a
lo t o f u sa bilit y
ch alle nges, w hic h E ric S now is lo okin g to a ddre ss.
Dris co ll
: W ell good! S o le t's pre te nd th at I w ant to beco m e a co re
deve lo per lik e y o u. W hat
would I n eed to d o to a ctu ally b eco m e o ne?
Coghla n
: S o o ne o f th e m ost im porta nt th in gs is to fig ure o ut w hy y o u
want to b eco m e a c o re
deve lo per. Y ou n eed th e a nsw er to th at q uestio n
beca use th ere are goin g to be in evit a ble
fr u str a tio ns w here yo u a sk
yo urs e lf : " W hy th e h ell a m I d oin g th is ? !"
If y o u d on't k n ow w hat y o ur m otiv a tio ns a re , th en th at's g oin g to b e a
pro ble m ! N obody
els e c a n a nsw er th e q uestio n fo r y o u. H avin g g ot p ast
th at p oin t, th e m ain th in g a bout
beco m in g a c o re d eve lo per is th at a lo t o f
it 's a ctu ally a bout tr u st a nd e arn in g tr u st.
Nic k C oghla n : 'T he m ain t h in g a b out b eco m in g a c o re d evelo per is
th at a lo t o f it 's
actu ally a b out t r u st a n d e arn in g t r u st.'
It's a ca se o f co ntr ib utin g, so a s co re re vie w ers w e'r e b asic a lly th ere
sa yin g, " D o
we w ant to a cce pt th is c h ange a nd m ain ta in it in to th e fu tu re ?
Can w e g iv e a g ood
answ er a bout w hy w e h ave a cce pte d th e c h ange, if
la te r a ske d?"
What w e'r e lo okin g fo r w hen n om in atin g n ew c o re d eve lo pers a nd c o re
re vie w ers is s o m eone
whose a bilit y w e tr u st to m ake g ood ju dgem ents .
We w ant th em to s a y, " Y es, th is is
a s u it a ble c h ange th at w ill, o n b ala nce ,
make lif e b ette r fo r fu tu re P yth on u se rs ."
Pro gra m min g la nguage desig n is a gam e of tr a de-o ff s . If yo u tr y to
optim iz e fo r e ve ry th in g
at o nce , th en y o u e nd u p o ptim iz in g fo r n oth in g.
So th ere a re a lo t o f th in gs th at
have e m erg ed o ve r tim e a s th e tr a de-o ff s
th at m ake s o m eth in g P yth onic . It b eco m es
a m atte r o f u n ders ta ndin g
wheth er y o u c a n d ecid e s o m eth in g o n y o ur o w n, o r w heth er
yo u n eed to
ta ke a p ro ble m to P yth on-D ev fo r d is cu ssio n.

Nic k C oghla n : 'P ro gra m min g la n guag e d esig n is a g am e o f t r a d e-
off s . If y o u t r y t o
optim iz e f o r e very th in g a t o nce, t h en y o u e n d u p
optim iz in g f o r n oth in g.'
Then th ere is a fin al le ve l o f
e sca la tio n, w hen w e s a y, "T his p ro posa l is
tr ic ky e nough a nd th ere a re e nough s u btle tie s
here . T here is e nough
pote ntia l co ntr o ve rs y here th at w e sh ould esca la te th is pro ble m
to
beco m e a fu ll P yth on E nhance m ent P ro posa l a nd th ra sh o ut th e d eta ils ,
befo re d oin g
anyth in g e ls e ." It's u lt im ate ly a c o re d eve lo per th at m ake s
th e d ecis io n a bout w here
in th at s p ectr u m a p artic u la r c h ange lie s.
Nic k C oghla n : 'I t 's u lt im ate ly a c o re d evelo per t h at m akes t h e
decis io n a b out w here
in t h at s p ectr u m a p artic u la r c h an ge lie s.'
Dris co ll
: H ow d oes a c o re d eve lo per g o a bout m akin g th at d ecis io n?
Coghla n
: W ell, b ug fix e s
are u su ally p re tty s tr a ig htfo rw ard b eca use w e
kn ow s o m eth in g is w ro ng. E ve n w it h a
bug fix th ough, it 's s o m etim es
co nfu sin g.
We h ave th re e s o urc e s o f tr u th , b eca use w e h ave w hat th e re fe re nce
in te rp re te r does,
what th e te st su it e sa ys it does, and what th e
docu m enta tio n s a ys it d oes. W hen a ll
th re e o f th ose a re in a gre em ent,
th en y o u k n ow th at th ere is c o nsis te ncy w it h w hat
yo u a re d oin g.
Where th in gs sta rt b eco m in g m ore o f a m atte r o f d esig n ju dgm ent is
when th e in te rp re te r
does s o m eth in g, a nd th e te st s u it e a nd th e d ocs a re
sile nt o n it . T hat c a se ju st is n 't
te ste d, a nd is n 't d ocu m ente d a s d oin g
anyth in g in p artic u la r. T hen th e o th er c a se
is w hen th e d ocu m enta tio n
sa ys o ne th in g, b ut th e te sts a nd th e im ple m enta tio n sa y
so m eth in g
dif f e re nt. In th ose c a se s, y o u h ave to s a y, "W ell, is th e d ocu m enta tio n
rig ht a nd it 's a b ug, o r a re th e d ocs ju st w ro ng?"
Those a re th e k in ds o f th in gs th at y o u g et to d o a s a c o re d eve lo per.
Where as w hen
yo u'r e co ntr ib uto r, yo u ju st w ant to g et yo ur id eas in .
That's s till a q uestio n o f
tr u st m anagem ent, b ut w hat y o u'r e tr y in g to d o is
pers u ade re vie w ers th at yo ur ch ange
is w orth m akin g. S o ye ah, it 's

ce rta in ly in te re stin g!
You n eed to u nders ta nd w hat
b eco m in g a c o re d eve lo per e nta ils , a nd
why it 's s o m eth in g y o u w ant. In te rm s o f th e
pra ctic a l m ech anic s o f th e
ro le , th ere 's th e D ev G uid e th at B re tt C annon o rig in ally
wro te w it h B SF
fu ndin g. T he D ev G uid e h as b een m ain ta in ed a nd e nhance d o ve r tim e
and
it e xp la in s th e d if f e re nce b etw een b ein g a c o re d eve lo per a nd b ein g
a c o ntr ib uto r
to C Pyth on.
Nic k C oghla n : 'T here a re e xtr a r e sp onsib ilit ie s t h at c o m e w it h b ein g
a c o re d evelo per.'
There a re e xtr a re sp onsib ilit ie s th at c o m e w it h b ein g a c o re d eve lo per.
The ro le in clu des
work in g wit h is su es, work in g wit h th e re vie w er,
unders ta ndin g th e re vie w p ro ce ss,
dis cu ssin g th in gs o n th e m ailin g lis ts
and m akin g d esig n d ecis io ns. Y ou e nd u p d ealin g
wit h th e in evit a ble
fr u str a tio ns of actu ally work in g on su ch a big pro je ct. The co re
mento rs h ip m ailin g lis t ca n a ls o b e u se fu l, d ependin g o n th e kin d o f
pers o n y o u a re .
Dris co ll
: So I'v e alw ays been in te re ste d in
Pyth on Enhance m ent
Pro posa ls . C ould y o u d escrib e th e p ro ce ss o f h ow th ey g et c re ate d
and
acce pte d?
Coghla n
: Yes, so th ere are tw o dif f e re nt flo w s th at th e Pyth on
Enhance m ent P ro posa ls ( P EPs)
c a n g o th ro ugh.
Nic k C oghla n : 'O ne f lo w is w hen a c o re d evelo per p ro poses a
ch an ge t h at w e k n ow w e
wan t t o m ake, b ut w e a ls o k n ow t h at t h is
ch an ge w ill b e b ig a n d c o m ple x.'
One flo w is w hen a c o re d eve lo per p ro pose s a c h ange th at w e k n ow w e
want to m ake ,
but w e a ls o k n ow th at th is c h ange w ill b e b ig a nd c o m ple x.
We k n ow w it h out a nyb ody
te llin g u s th at th is c h ange n eeds to b e a P EP.
So in th ose c a se s, w e'l l o fte n ju st
sta rt b y w rit in g th e P EP a nd c o m mit tin g
th e P EP to th e P EPs r e po.

We w ill th en s ta rt th e d is cu ssio n o n P yth on-id eas b y s a yin g, "H ey, I'v e
writ te n a
new P EP p ro posin g th is , a nd h ere is w hy." D is cu ssio ns b asic a lly
ju st sta rt at th at
le ve l. C ore deve lo pers m anage th e P EP pro ce ss,
beca use w e'v e b een th ro ugh it a fe w
tim es a nd w e k n ow w hen a c h ange
is b ig e nough to q ualif y .
For o th er P EPs, th e u su al
poin t o f g enesis is w hen s o m ebody c o m es to
Pyth on-id eas w it h a s u ggestio n. T his s u ggestio n
will h ave b een k ic ke d
aro und a s a P yth on-id eas th re ad fo r a b it . P eople w ill th en
have s a id ,
"Y ou k n ow w hat, th is a ctu ally s o unds lik e it c o uld p ote ntia lly b e a g ood
id ea!" T he d ecis io n is th en m ade to tu rn th e id ea in to a fu ll P EP a nd
pro pose th e
id ea th at w ay, ra th er th an ju st s u bm it tin g it a s a n is su e o n
th e is su e tr a cke r.
That d oes a ctu ally re m in d m e o f th e th ir d w ay th at P EPs h appen. T hey
ca n c o m e o ut
of d is cu ssio ns o n th e is su e tr a cke r w hen w e d efin it e ly
kn ow w e w ant to m ake a c h ange,
but th ere a re lo ts o f n ig gly d eta ils . W e
writ e a P EP, th ra sh o ut th e d eta ils , a nd
th en u se th at to d riv e h ow w e
im ple m ent th e id ea.
Nic k C oghla n : 'W e w rit e a P EP, t h ra sh o ut t h e d eta ils , a n d t h en u se
th at t o d riv e
how w e im ple m en t t h e id ea.'
Dris co ll
: S o a re th ese c h anges ju st d is cu sse d u ntil th ey e ve ntu ally g et
ir o ned o ut, a nd th en
acce pte d o r r e je cte d?
Coghla n
: It d epends o n th e p ro posa l. W it h s o m e p ro posa ls , th e c h ange
it s e lf is n ot c o ntr o ve rs ia l,
but th e d eta ils ju st n eed th ra sh in g o ut.
Those p ro posa ls w ill u su ally g o th ro ugh so m e d is cu ssio n o n P yth on-
id eas a nd P yth on-D ev.
The d ecis io n w ill th en b e m ade to s to p th ra sh in g
out th e id ea and sta rt im ple m entin g
it . The pro posa l beco m es an
acce pte d P EP a nd e ve ntu ally g oes th ro ugh to fin al.
Som e p ro posa ls a re m ore b ord erlin e a nd w e p ut a q uestio n to P yth on-
Dev a bout w heth er
th ey a re in fa ct a g ood id ea. W e d o a ctu ally h ave a
pro posa l o pen a t th e m om ent a ro und
th e n ull c o ale scin g o pera to r. W e
genuin ely d on't k n ow if w e w ant to p ro ce ed. T his
PEP w ould m ake th e

la nguage m ore c o m ple x, b eca use it 's a c ry p tic s yn ta x th at p eople
would
have to le arn a nd u nders ta nd. S o th at's th e m ain a rg um ent a gain st th e
id ea.
But o n th e a rg um ent in fa vo r, y o u'r e s a yin g, " W ell, th is is a p atte rn
th at c o m es u p
fa ir ly o fte n in d ata m anip ula tio n p ip elin es."
So th at P EP is s till in d is cu ssio n, u ntil it d oes g et to th e p oin t o f fin ally
bein g
put to P yth on-D ev a s a y e s o r n o q uestio n. T hen th e d ecis io n w ill
be m ade th at y e s
we d efin it e ly w ant to p ro ce ed, o r n o w e d on't , u nle ss
so m eth in g c h anges.
Nic k C oghla n : 'V ery o ccasio nally , y o u d o g et P EPs t h at a re w rit te n
sp ecif ic ally t o
be r e je cte d .'
Very o cca sio nally , y o u d o g et
PEPs th at a re w rit te n s p ecif ic a lly to b e
re je cte d. In th ose c a se s, a n id ea k e eps c o m in g
up, b ut th e a rg um ents
again st it h ave n eve r b een c le arly d ocu m ente d a nyw here . S o s o m eone
is
ju st ta kin g th e tim e to w rit e d ow n th e id ea a nd w rit e d ow n a ll th e r e aso ns
th at
we re je cte d th e P EP, b efo re s a yin g, "R ig ht! I'm p ostin g th is a s a
re je cte d P EP, to
sa y th is is w hy w e d on't d o th is ". T hat m ake s m e th in k o f
so m e o f th e n ew s tu ff th at
I'v e s e en in P yth on 3 .5 a nd 3 .6 , th at w as o nly
partia lly a cce pte d a nd c la sse d a s p ro vis io nal.
Dris co ll
: S o is th at s lig htly d if f e re nt? D oes th at m ean th at p eople h ave
agre ed e nough th at
th ey w ant to a dd s o m eth in g, b ut th ey m ay n ot k e ep
it ?
Coghla n
: Y es, s o w e g ot c a ught a c o uple o f tim es w hen w e a cce pte d a
ch ange, a nd th e n ew A PI,
and im media te ly p ut it u nder o ur s ta ndard
backw ard s c o m patib ilit y g uara nte e.
What w e e nded u p d oin g w as p ain tin g o urs e lv e s in to a c o rn er. W e w ere
stu ck s u pportin g
an A PI th at a ctu ally w asn 't v e ry g ood fo r th e p ro ble m it
was a im in g to s o lv e . W e w ere
gettin g th ese s u ggestio ns a nd p ote ntia l
module a ddit io ns th at w ere c le arly b enefic ia l
and c le arly h elp fu l fo r u se rs .
The p ro ble m w as th at w e w ere n ot s u re w e h ad th e A PI
desig n d eta ils
rig ht.

Nic k C oghla n : 'W e w ere s tu ck s u pportin g a n A PI t h at a ctu ally w asn 't
very g ood f o r
th e p ro ble m it w as a im in g t o s o lv e.'
We d id n't w ant to p ut a nyth in g u nder o ur fu ll s ta ndard lib ra ry b ackw ard s
co m patib ilit y
guara nte e, s o w e d ecid ed n ot to in clu de th e a ddit io ns. T his
appro ach e nded u p b ein g
bad fo r e ve ry o ne, b eca use it k e pt th in gs o ut o f
th e s ta ndard lib ra ry th at r e ally s h ould
have b een in th ere .
We a ls o c o uld n't u se th at ty p e o f m odule to h elp u s to im pro ve o th er
parts o f th e
sta ndard lib ra ry . H onestly , o ne o f th e m ain w ays th at n ew
build in g b lo cks g et in to
th e s ta ndard lib ra ry is b eca use w e w ant to u se
th em in o th er p arts o f th e s ta ndard
lib ra ry . S o th ere 's a s ta ndard lib ra ry
enum
ty p e n ow , b eca use w e w ante d
enum
ty p es in th in gs lik e th e s o cke t
module .
The pro vis io nal P EP, w hic h I th in k ended up bein g P EP 411 , w ent
th ro ugh a fe w it e ra tio ns.
Basic a lly P EP 4 11 w as d esig ned to g iv e u s th at
abilit y to a cce pt m odule s th at w e'r e
pre tty c o nfid ent w e'r e g oin g to k e ep,
but w e'r e n ot s u re w e h ave th e A PI d esig n d eta ils
rig ht y e t.
We le ave a P EP a s p ro vis io nal fo r
a c o uple o f r e le ase s, to g iv e o urs e lv e s
th e r ig ht to m ake b re akin g c h anges to th e
API if w e m ess s o m eth in g u p. I
th in k a syn c I/O o nly ju st w ent n on-p ro vis io nal in P yth on
3.6 .
Nic k C oghla n : 'W e le ave a P EP a s p ro vis io nal f o r a c o uple o f
re le ases, t o g iv e o urs elv es
th e r ig ht t o m ake b re akin g c h an ges t o
th e A PI if w e m ess s o m eth in g u p.'
Dris co ll
: S o d oes le avin g a P EP a s p ro vis io nal w ork w ell?
Coghla n
: Y es, w e'r e a ctu ally re ally h appy w it h h ow th at's w ork e d o ut. It
le ts u s g iv e p eople
th at c le ar w arn in g th at a P EP is s till a b it in flu x. T his
le ts u se rs k n ow th at w e'r e
still fig urin g o ut th e d eta ils a nd if th is b oth ers
th em , th en th ey s h ould n't u se th at
PEP y e t.
There w as a ctu ally a n in te re stin g e xa m ple re ce ntly fo r P yth on 3 .6 w it h
pathlib
. S o
pathlib
h ad b een in clu ded a s a p ro vis io nal A PI a nd it h ad

lo ts o f in te ro pera bilit y p ro ble m s
wit h o th er s ta ndard lib ra ry A PIs th at w ere
exp ectin g s tr in gs.
Nic k C oghla n : 'F or P yth on 3 .6 , p ath lib h ad h it a c ro ssro ad s.'
For P yth on 3 .6 ,
pathlib
h ad h it a c ro ssro ads a nd w as e it h er g oin g to g et
ta ke n o ut o f th e s ta ndard lib ra ry
again a nd p ush ed b ack to p ure ly b ein g a
PyP I m odule , o r th e in te ro pera bilit y is su es
had to b e fix e d. T hat w as th e
eit h er/o r d ecis io n th at w as b efo re th e c o re d eve lo pm ent
te am fo r P yth on
3.6 .
This d ecis io n b eca m e th e
os.path
p ro to co l, o r th e
os.fspath
p ro to co l a nd
th e p ath -lik e o bje cts s u pport, w hic h is b asic a lly fix in g th e in te ro pera bilit y
pro ble m fo r
pathlib
. S o th is m eans th at th ere a re a lo t o f s ta ndard lib ra ry
APIs n ow th at a uto m atic a lly
acce pt p ath -lik e o bje cts .
Dris co ll
: A lr ig ht, s o w hat is th e
Pyth on P acka gin g A uth orit y ?
Coghla n
: S o th e P yth on P acka gin g A uth orit y 's n am e a ctu ally s ta rte d a s
a jo ke b y th e p ip a nd
vir tu ale nv d eve lo pers . T hey w ante d a n am e fo r th e
deve lo pm ent te am th at c o ve re d b oth
pro je cts . S o th ey s a id , "L et's c a ll
ours e lv e s th e P yth on P acka gin g A uth orit y , b eca use
nobody e xp ects th e
Pyth on P acka gin g A uth orit y !"
Then, b ack in 2 013, w e
w ere s ta rtin g to a ctiv e ly tr y to b rin g m ore o f th e
to ols , lik e
setuptools
and
distutils
, in to th at sp ace . The Pyth on
Packa gin g U se r G uid e s ta rte d
b rin gin g a ll th at in fo rm atio n to geth er, to
off e r a m ore c o here nt a nd
off ic ia lly re co m mended w ay o f d oin g th in gs.
We n eeded a n am e fo r th at u m bre lla g ro up
to o. W e d ecid ed th at th e
Pyth on P acka gin g A uth orit y w as k in d o f c o ol a s a n am e, s o
we c o uld
sta rt b rin gin g in m ore p ro je cts u nder th at u m bre lla .
Nic k C oghla n : 'W e d ecid ed t h at t h e P yth on P ackag in g A uth orit y w as
kin d o f c o ol a s
a n am e, s o w e c o uld s ta rt b rin gin g in m ore p ro je cts
under t h at u m bre lla .'

Basic a lly , th e Pyth on Packa gin g Auth orit y occu pie s a ro le aro und
packa gin g to ols a nd
in te ro pera bilit y s ta ndard s, th at's s im ila r to th e ro le
th at c o re d eve lo pers p la y in
re la tio n to P yth on a s a w hole . W hile th ere 's
so m e ove rla p betw een people w ho are in te re ste d
in pro gra m min g
la nguage d esig n a nd p eople w ho a re in te re ste d in s o ftw are d is tr ib utio n
desig n, th ere a re a lo t o f p eople w ho fa ll o n o ne s id e o r th e o th er. T hose
people
are n't th e le ast b it in te re ste d in th e o th er a sp ects .
Separa tin g th e tw o ty p es o f p eople m eans th at a nyo ne w ho c a re s a bout
both ty p es o f
desig n c a n p artic ip ate in b oth s u bco m munit ie s. B ut w e'r e
not c o nsta ntly tr y in g to
exp la in th e c o m ple xit ie s o f s o ftw are d is tr ib utio n to
la nguage d esig ners a nd v ic e v e rs a .
I th in k th is s p lit h as m ade p eople a
lo t h appie r in g enera l. It's n ic e to b e in a
gro up th at y o u u nders ta nd. I lik e
packa gin g, b ut I lik e P yth on to o. S o I'm k in d o f
to rn o n w hic h o ne I'd
pro bably fa ll u nder. I'd p ro bably w ant to w ork o n P yth on a nd
th e P yth on
Packa gin g A uth orit y to o.
Nic k C oghla n : 'I lik e p ackag in g, b ut I lik e P yth on t o o. S o I'm k in d o f
to rn o n w hic h
one I'd p ro bab ly f a ll u nder.'
Dris co ll
: P yth on is o ne o f th e m ajo r la nguages b ein g u se d in A I a nd
mach in e le arn in g. W hy
do y o u th in k th is is ?
Coghla n
: A I a nd m ach in e
le arn in g a re a n in te re stin g m ix o f
exp lo ra to ry
in te ra ctiv e d ata a naly sis a nd h eavy-d uty n um ber-c ru nch in g. C Pyth on's
ric h
C API has le d to Pyth on se rv in g as a 'g lu e' la nguage fo r
in te rc o nnectin g h ig h p erfo rm ance
co m ponents w rit te n in la nguages lik e
C, C ++, a nd F ortr a n.
The s cie ntif ic re se arc h
c o m munit y h as b een u sin g P yth on th at
w ay fo r
more th an 2 0 y e ars (th e fir s t v e rs io n o f N um eric w as re le ase d in 1 995).
This
means th at P yth on o ff e rs a u niq ue h yb rid o f a fle xib le , y e t e asy-to -
le arn a nd g enera l- p urp ose
co m putin g la nguage, c o m bin ed w it h a s e t o f
scie ntif ic co m putin g lib ra rie s, deve lo ped
fo r use in hig h-p erfo rm ance
co m putin g e nvir o nm ents .
Dris co ll
: W hat c o uld b e d one to m ake P yth on a b ette r la nguage fo r A I
and m ach in e le arn in g?

Coghla n
: O n th e e ase o f u se s id e, th ere a re s till a lo t o f o pportu nit ie s to
make co m ponents
more re adily ava ila ble to use rs , eit h er th ro ugh
pre co nfig ure d fr e em iu m web se rv ic e s
(lik e Google Cola bato ry or
Mic ro so ft A zu re N ote books), o r lo ca lly th ro ugh th e P yth on
and C onda
packa gin g to olc h ain s.
On th e p erfo rm ance s id e, th ere a re a ls o a lo t o f u nexp lo re d o pportu nit ie s
to b ette r
optim iz e th e C Pyth on in te rp re te r a nd th e C yth on s ta tic c o m pile r
(fo r e xa m ple , C yth on
doesn 't c u rre ntly s h ip a s h are d d yn am ic r u ntim e, s o
th ere 's lik e ly a lo t o f d uplic a te d
boile rp la te c o de in g enera te d m odule s,
th at n ot o nly m ake s th em la rg er a nd s lo w er
to c o m pile , b ut a ls o s lo w er to
im port a t r u ntim e).
Dris co ll
: S o I n otic e d th at y o u a re a fe llo w b lo gger. H ow lo ng h ave y o u
been w rit in g a bout
Pyth on a nd w hat m ade yo u d ecid e to b eco m e a
blo gger?
Coghla n
: It w as p ro bably a ro und P yth on 3 .3 th at I s ta rte d ta lk in g a bout
pro gra m min g s tu ff
on m y b lo g. M ostly , I fin d w rit in g is a v e ry u se fu l a id to
th in kin g. Y ou'r e fo rc e d
to g et a n id ea c o here nt e nough to b e r e adable . S o
th at's m ain ly th e w ay th at I s till
use th e b lo g n ow . If th ere 's s o m eth in g in
partic u la r a bout P yth on th at I w ant to re fe re nce
la te r, th en I w rit e d ow n
my c u rre nt th oughts .
Dris co ll
: In y o ur o pin io n, is P yth on a g ood la nguage to a ctu ally s ta rt
le arn in g p ro gra m min g
wit h ?
Coghla n
: I d o re co m mend P yth on a s a fir s t te xt- b ase d la nguage. F or a
lo t o f p eople , s ta rtin g
wit h o ne o f th e p lu g-a nd-p la y la nguages is a g ood
alt e rn ativ e if th ey w ant to g et
th e b asic c o nce pts d ow n.
Nic k C oghla n : 'O nce y o u w an t t o g et in to f u ll c o m bin ato ria l
pro gra m min g, t h en P yth on's
a v ery g ood la n guag e.'
Once y o u w ant to g et in to fu ll c o m bin ato ria l p ro gra m min g, th en P yth on's
a v e ry g ood
la nguage. T he d elib era te la nguage d esig n re str ic tio ns a re
not v e ry b rig ht. Y ou c a nnot
get th em to p ars e v e ry c o m plic a te d a ctio n a t
a d is ta nce th in gs. If y o u s tu dy lin guis tic s,
th en y o u r e aliz e th at th e h um an

bra in a ls o s tr u ggle s to p ars e c o m plic a te d a t a d is ta nce
th in gs.
So th e a dva nta ge o f
Pyth on is th at y o u o nly n eed o ne to ke n lo ok a head
to u nders ta nd th e c o nte xt o f th e
th in g y o u'r e c u rre ntly lo okin g a t. Y ou
don't n eed to k e ep m uch in y o ur h ead to u nders ta nd
what th e c o de is
tr y in g to te ll yo u. W e tr y to ke ep th in gs vis ib le a s to w here d if f e re nt
nam es are co m in g fr o m . I th in k th at m ake s a su rp ris in g am ount of
dif f e re nce to h ow
easy it is fo r p eople to fit id eas in to th eir b ra in .
I m ade a p ost s e ve ra l y e ars a go a bout s crip tin g la nguages a nd s u it a ble
co m ple xit y .
If y o u lo ok a t a c o okb ook, o r a w ork in str u ctio n g uid e, th en
yo u w ill fin d p ro ce dura l
in str u ctio ns. T he o ute r la ye r o f a c o okb ook is v e ry
much p ro ce dura l a nd s e quentia l.
Then th e s u bfu nctio ns a nd th e o bje cts
are a ll k in d o f e m bedded w it h in th at fr a m ew ork .
I th in k P yth on w ork s w ell
fo r p eople b eca use it r e fle cts h ow w e in te ra ct w it h th e
world .
Nic k C oghla n : 'I t h in k P yth on w ork s w ell f o r p eo ple b ecau se it
re fle cts h ow w e in te ra ct
wit h t h e w orld .'
Dris co ll
: C ould yo u e xp la in a lit tle m ore a bout w hy P yth on w ork s so
well?
Coghla n
: S ure , w e d o th in gs in s e quence . S ta rtin g p ro ce dura lly a s y o ur
fo undatio n, a nd th en
la ye rin g a ll o f y o ur o th er th in g s o n to p, a s y o u n eed
th em , m ake s a lo t o f s e nse .
Obje ct- o rie nte d p ro gra m min g, fu nctio nal p ro gra m min g a nd e ve nt- b ase d
pro gra m min g a re
all te ch niq ues th at w e h ave c o m e u p w it h to m anage
co m ple xit y . W hic h eve r o ne o f th em
yo u ch oose , a s yo ur fu ndam enta l
org aniz in g p rin cip le fo r y o ur la nguage, th en s e ts
th e m in im um le ve l o f
co m ple xit y fo r w hat y o u d o.
It's re ally in te re stin g to ta lk to p eople th at te ach w it h ro botic s a nd th e
em bodie d
co m putin g ty p e envir o nm ent. W hen yo u te ach th at w ay,
sta rtin g w it h o bje cts is a g ood
way to g o. E m bodie d c o m putin g p eople
have th at natu ra l abilit y to sa y, "T hat ro bot
sit tin g on m y desk
co rre sp onds to th e c la ss 'R obot' in m y p ro gra m ." T hey c a n d o th at
vis u al
co rre la tio n.

I th in k it 's th e c a se th at p ro ce dura l b y
defa ult re ally d oes m atc h th e w ay
co okb ooks a nd in str u ctio ns a re w rit te n. T hat is
good fo r lo w erin g b arrie rs
to e ntr y b ut, a t th e s a m e tim e, P yth on is a la nguage th at
ca n g ro w w it h
yo u. P yth on h as a ll th e to ols to d o m ath em atic a l p ro gra m min g, o bje ct-
orie nte d
pro gra m min g a nd fu nctio nal p ro gra m min g.
Nic k C oghla n : 'P yth on is a la n guag e t h at c an g ro w w it h y o u.'
You c a n u se P yth on b ase d o n th e k in ds o f p ro ble m s th at y o u h ave . W hen
yo u s ta rt le arn in g
more a bout p artic u la r a sp ects o f P yth on, th en y o u c a n
use th at a s a la unch in g p oin t
to g et in to la nguages th at s p ecia liz e in a
partic u la r a re a. S o y o u c a n u se P yth on
to la unch in to H aske ll (fu nctio nal
pro gra m min g), J a va o r C #.
Dris co ll
: S o le t's p re te nd th at I k n ow a ll th e b asic s o f P yth on a nd n ow I
want to e nhance
my u nders ta ndin g o f th e la nguage. W hat s h ould I d o?
Coghla n
: T he im porta nt q uestio n to a sk y o urs e lf a t th is p oin t is h ow y o u
le arn . S o fo r e xa m ple ,
fo r m yse lf , I fig ure d o ut th at I'm v e ry m uch a bout
needs-b ase d le arn in g.
Nic k C oghla n : 'I le arn ed n ew p ro gra m min g t e ch niq ues a n d n ew
lib ra rie s in o rd er t o
so lv e a p ro ble m .'
I d on't d o w ell le arn in g th in gs ju st fo r th e s a ke o f le arn in g th em . I le arn
new pro gra m min g
te ch niq ues and new lib ra rie s in ord er to so lv e a
pro ble m . In m y c a se , I fin d th e p ro ble m
I'm in te re ste d in s o lv in g a nd th en
le arn w hate ve r I n eed to d o to s o lv e th at.
In te rm s o f le arn in g m ore , A llis o n K aptu r h as w rit te n s o m e q uit e g ood
stu ff . W e'v e
sta rte d a ddin g a s e ctio n to th e D ev G uid e a bout d iv in g in to
in te rn als . O ne u se fu l
tr ic k c a n b e to lo ok a t s o m eth in g y o u u se e ve ry d ay,
partic u la rly a n o pen s o urc e lib ra ry ,
and ju st s ta rt d ig gin g in to th e c o de.
Nic k C oghla n : 'L ook a t s o m eth in g y o u u se e very d ay, p artic u la rly a n

open s o urc e lib ra ry ,
an d ju st s ta rt d ig gin g in to t h e c o de.'
So in th e s ta ndard lib ra ry , th ere w ill a ctu ally b e lin ks to th e s o urc e c o de
fr o m th e
sta ndard lib ra ry m odule d ocu m enta tio n. A ctu ally ju st g oin g a nd
re adin g th at, a nd tr y in g
to fig ure o ut w hy c e rta in th in gs a re d one, c a n b e
use fu l.
That re m in ds m e of anoth er in te re stin g pro je ct ca lle d P yth on Tuto r
(p yth ontu to r.c o m ).
Pyth on Tuto r is a co de vis u aliz e r or a behavio ra l
vis u aliz e r. A s y o u w ork th ro ugh
th e c o de, P yth on T uto r h as a lit tle s yste m
model th at it u pdate s p ro gre ssiv e ly , e xp la in in g
what's g oin g o n.
One s tr a te gy, th at I k n ow s o m e p eople h ave c e rta in ly fo und u se fu l, is
tr y in g to ch ange
th in gs, not beca use th ey actu ally w ant to m ake a
ch ange, b ut ju st to le arn th e m ech anic s
of w hat's in vo lv e d.
Dris co ll
: W hat a re y o u m ost
e xcit e d a bout in P yth on to day?
Coghla n
: I'l l g iv e a s p lit a nsw er h ere , a s m y p ro fe ssio nal a nd p ers o nal
pers p ectiv e s o n th e
questio n a re s lig htly d if f e re nt.
In a lo t o f w ays, P yth on h as d one to th e L in ux e co syste m w hat th e L in ux
eco syste m
did to e nte rp ris e o rg aniz a tio ns in g enera l: b eco m e u biq uit o us
wit h out a nyo ne re ally
both erin g to te ll e xe cu tiv e m anagem ent a bout it .
This m eans th at eve ry th in g w e'v e
ach ie ve d so fa r has been done
prim arily th ro ugh th e e ff o rts o f th e v o lu nte er c o m munit y
co ntr ib uto rs , w it h
only o cca sio nal a nd in te rm it te nt in ve stm ents fr o m la rg e c o m merc ia l
and
in stit u tio nal u se rs .
Nic k C oghla n : 'E very th in g w e'v e a ch ie ved s o f a r h as b een d one
prim arily t h ro ugh t h e
eff o rts o f t h e v o lu nte er c o m munit y
co ntr ib uto rs .'
So p ro fe ssio nally , th e th in g th at m ost e xcit e s m e is th e fa ct th at th e
in cre ase in
th e u se o f A I a nd m ach in e le arn in g te ch niq ues in b usin e ss
so ftw are d eve lo pm ent is
pro m ptin g a lo t o f o rg aniz a tio ns to re aliz e th at
th ere 's m ore to th e w orld of so ftw are
deve lo pm ent th an th e cu rre nt

ente rp ris e in cu m bents o f C , C ++, J a va , a nd C #.
This has been m ost cle arly vis ib le in re ce nt ye ars th ro ugh IE EE
Spectr u m 's a nnual
mult i- d ata -s o urc e la nguage ra nkin g, w here P yth on
sta rte d o ut, in 2 014, a t th e e dge
of th e to p fiv e ( w it h C #), b ut h as s te adily
clim bed th ro ugh th ose r a nkin gs, r e ach in g
fir s t p la ce in th e 2 017 e dit io n o f
th e s u rv e y.
Pers o nally , th e th in g th at m ost excit e s m e is th e w ay w e'r e gettin g
te ach ers a nd o th er
educa to rs d ir e ctly in vo lv e d in th e o pen s o urc e P yth on
co m munit y . P ro m pte d b y a n e xce lle nt
ke yn ote fr o m Ja m es C urra n a t
PyC on A ustr a lia 2 014, a nd th e E duca tio n T ra ck a t P yC on
UK, I fo unded
th e P yC on A ustr a lia E duca tio n S em in ar in 2 015, a nd w e'v e b een r u nnin g
th at e ve ry y e ar s in ce .
A lo t o f P yth on
use r g ro ups a ls o h ave a s p ecif ic fo cu s o n a dult e duca tio n
and o ff e r w ork sh ops fo r
fo lk s e it h er lo okin g to im pro ve th eir c o m putin g
skills in th eir c u rre nt p ro fe ssio n,
or c o nte m pla tin g a c a re er c h ange in to
so ftw are d eve lo pm ent.
Dris co ll
: T hank y o u, N ic k C oghla n.

C hap te r 1 9. M ik e B ayer
M ik e B aye r
is a n A m eric a n s o ftw are d eve lo per a nd a s e nio r s o ftw are
e ngin eer at R ed H at, w hic h
se lls open so urc e so ftw are pro ducts .
P re vio us p osit io ns in clu de m any N ew Y ork -b ase d
in te rn et c o m panie s lik e
M LB .c o m . H e a ls o w ork e d o n c o nte nt m anagem ent s o ftw are a t
Majo r
L eague B ase ball. M ik e is th e cre ato r of a num ber of open so urc e
p ro gra m min g
lib ra rie s fo r P yth on, s u ch a s
SQ LA lc h em y, a n S Q L to olk it
a nd obje ct- re la tio nal m apper. H e pla ys an activ e ro le in
th e P yth on
c o m munit y b y p ro m otin g g ood d ata base s o ftw are p ra ctic e s. M ik e is a
r e gula r
sp eake r a t P yC on U S a nd s m alle r c o nfe re nce s in E uro pe.
Dis cu ssio n t h em es: S Q LA lc h em y, A I, v 2.7 /v 3.x .
Catc h u p w it h M ik e B ayer h ere : @ zzze ek
M ik e D ris co ll
: W hat m ade y o u
beco m e a p ro gra m mer?
M ik e B ayer
: I'v e h ad a n in te re st in c o m pute rs s in ce 1 980, w hen I w as
f ir s t exp ose d to early
pers o nal co m pute rs . I tr ie d to le arn gam e
p ro gra m min g in a sse m bly la nguage fo r e arly
8-b it co m pute rs , w it h out
m uch su cce ss. In h ig h sch ool, I w as e xp ose d to d ata str u ctu re s
and
p ro ce dura l p ro gra m min g w it h P asca l.
I t s e em ed p re tty n atu ra l th at I'd b eco m e a p ro gra m mer, b ut a s it tu rn ed

out, I sw it c h ed
majo rs fr o m co m pute r e ngin eerin g to m usic a nd to ok
se ve ra l y e ars o ff fr o m to uch in g
co m pute rs a t a ll. I h ad fo und m yse lf b ein g
ove rly c o m petit iv e w it h o th er p ro gra m mers
th at I m et o n b ulle tin b oard s
and I d id n't lik e w ho I w as.
I g ot b ack in to c o m pute rs s tr ic tly b eca use it w as th e o nly w ay th at I c o uld
eat a nd
pay re nt. A bout th at tim e, th e in te rn et
beca m e a co m merc ia l
in dustr y a nd I im media te ly g ot in vo lv e d in th at k in d o f w ork .
Once th e fir s t in te rn et b ubble c a m e a lo ng, b ein g a p ro gra m mer in N YC
was s u ddenly
in te nse a nd e xcit in g. E ve ry o ne w ante d yo u to w ork fo r
th em . The co m petit iv e ele m ent
of pro gra m min g has in fa ct cre ate d
co ntin uous p ro ble m s fo r m e o ve r th e y e ars . I'v e
had to w ork to m in im iz e
th at is su e.
Dris co ll
: S o h ow d id y o u g et s ta rte d w it h
P yth on?
Bayer
: M ost o f m y p re -P yth on c a re er w as s p ent p ro gra m min g in P erl,
Ja va , a nd a lit tle b it
of C . I w as re ally in to o bje ct- o rie nte d a pplic a tio n
desig n and I ended up goin g th ro ugh
a deep arc h it e ctu re astr o naut
phase , w hic h w as v e ry c o m mon w it h J a va p ro gra m mers in
th e la te 1 990s
and e arly 2 000s.
I lik e d th e id ea o f s crip tin g la nguages, b eca use th ey a llo w ed y o u to ju m p
rig ht in to
a te xt file . You would have so m eth in g th at co uld work
im media te ly w it h out th e fo rm alit y ,
boile rp la te and co m pila tio n ste p of
Ja va . S o I a ls o s p ent a lo t o f tim e tr y in g to
re aliz e O O d esig n in P erl,
whic h w as p re tty u nsa tis fy in g.
Mik e B ayer: 'A fte r a f e w y ears o f r e fu sin g t o a ccep t s ig nif ic an t
whit e sp ace, I f in ally
got in to P yth on.'
I b eca m e a w are th at P yth on m ig ht b e s o m eth in g th at c o uld r e ally s tr ik e a
bala nce b etw een
th ose tw o w orld s. A fte r a fe w ye ars of re fu sin g to
acce pt s ig nif ic a nt w hit e sp ace ,
I fin ally g ot in to P yth on a nd re aliz e d th at
th e la nguage w as in fa ct e ve ry th in g th at
I w as lo okin g fo r.
Mik e D ris co ll: W hat m akes P yth on s p ecia l t o y o u?

Bayer
: W hat im pre sse d m e a bout
Pyth on w as th e w ay th at e ve ry th in g in
yo ur in te rp re te r w as a P yth on o bje ct, in clu din g
all o f th e m odule s th at y o u
im porte d.
Now adays, th at w hole w ay o f lo okin g a t th in gs is s e co nd n atu re to m e.
But w hen I fir s t
le arn ed th at I c o uld in sp ect e le m ents o f th e p ro gra m it s e lf
as ju st m ore d ata , a ll
of th e o th er la nguages th at I'd b een e xp ose d to
were n oth in g lik e th at.
Pyth on w as s o s im ple to u nders ta nd, e sp ecia lly a fte r I h ad s p ent y e ars
neve r r e ally
unders ta ndin g w hat P erl's u se s ta te m ent d id . I a ls o o bse rv e d
in P yth on a c e rta in e m phasis
on c o nsis te ncy a nd c o rre ctn ess th at w as
unch ara cte ris tic in s crip tin g la nguages in
genera l.
I p re dic te d th at th e P yth on p ro gra m mers th at I'd b e w ork in g w it h w ould
be h ig her q ualit y
deve lo pers th an I'd o th erw is e b een e xp ose d to , s in ce
th ey w ere a ttr a cte d to P yth on!
That tu rn ed o ut to b e c o m ple te ly tr u e.
Dris co ll
: S o w hat in sp ir e d y o u to
c re ate S Q LA lc h em y?
Bayer
: W ell, I h ad a lw ays h ad th e
g oal o f fig urin g o ut w hic h p ro gra m min g
la nguage I w ante d to
make m y h om e in . W it h in th at la nguage, I w ante d
to w ork u p a fu ll s u it e o f to ols th at
I c o uld u se fo r e ve ry th in g. I w ante d to
be a ble to s tr ik e o ut in dependently a nd b uild
applic a tio ns fo r p eople .
Mik e B ayer: 'I w an te d t o b e a b le t o s tr ik e o ut in dep en den tly a n d
build a p plic atio ns
fo r p eo ple .'
At m y v a rio us jo bs, I h ad a lw ays h ad to c re ate s o m e k in d o f d ata base
abstr a ctio n la ye r
th at I'd th en u se in m any p ro je cts . I w as a lw ays b uild in g
lit tle te m pla te e ngin es,
min i w eb fr a m ew ork s a nd d ata base a bstr a ctio n
la ye rs , in w hate ve r la nguage I w as u sin g,
whic h I'd tr y to s ta ndard iz e fo r
all o f m y p ro je cts .
So w hen I g ot in to P yth on, I w as u nsa tis fie d w it h th e w eb fr a m ew ork to ols
and d ata base
abstr a ctio n to ols th at w ere a va ila ble a t th at tim e. I h ad a ls o
writ te n m any te m pla te
engin es a nd d ata base a cce ss to ols a lr e ady, s o I
had a lo t o f id eas.

Mik e B ayer: 'W hen I g ot in to P yth on, I w as u nsatis fie d w it h t h e w eb
fr a m ew ork t o ols
an d d ata b ase a b str a ctio n t o ols t h at w ere a vaila b le
at t h at t im e.'
I fir s t w ro te a te m pla te e ngin e c a lle d M yg hty , w hic h
w as a n a lm ost lin e-
fo r-lin e port of th e P erl te m pla te engin e H TM L::M aso n. M yg hty
was
horrib le , y e t it g ain ed s o m e b rie f p opula rit y a nd fo rm ed th e b asis o f th e
fir s t
ve rs io n o f th e P ylo ns w eb fr a m ew ork .
When I se t out to w rit e S Q LA lc h em y, I to ok a ve ry deep and slo w
appro ach , to tr y to
make it am azin g. I w as still ve ry fla w ed as a
pro gra m mer a nd e sp ecia lly a s a P yth on
pro gra m mer a t th at p oin t. E arly
SQ LA lc h em y had m any aw fu l desig n ch oic e s, but it still
sh in ed as
so m eth in g th at w as tr u ly u niq ue a nd p ote ntia lly k in d o f a m azin g. T he fir s t
tim e th at I s a w th e u nit o f w ork d o a flu sh , I w as a m aze d. I re aliz e d th at
th is th in g
mig ht h ave a d eep im pact o n p eople .
Dris co ll
: S o h ow d id M ako
c o m e a bout?
Bayer
: M ako w as v e ry s im ply c re ate d
to re pla ce M yg hty a nd a ll o f it s
horrib le d esig n c h oic e s, s o th at P ylo ns c o uld h ave
a te m pla te e ngin e th at
wasn 't e m barra ssin g.
Mako w as m eant to b e a v e ry c a pable a nd s o lid te m pla te e ngin e, w hic h
co uld m ore o r
le ss b e le ft to g o o n it s o w n o nce it w as c o m ple te . W hile
Mako d id g ain m ore fe atu re s
ove r th e ye ars , I'v e co nsid ere d it to b e
co m ple te fo r m any y e ars n ow . I s till u se
Mako , b ut I'm h appy fo r J in ja 2 to
be th e d e fa cto te m pla te e ngin e in P yth on. A rm in
Ronach er d id , a fte r a ll,
cre dit M ako 's a rc h it e ctu re fo r b ein g a lo t o f h is in sp ir a tio n
fo r c re atin g
Jin ja 2.
Mik e B ayer: 'I s till u se M ako , b ut I'm h ap py f o r J in ja 2 t o b e t h e d e
fa cto t e m pla te
en gin e in P yth on.'
Dris co ll
: If y o u c o uld s ta rt o ve r w it h
SQ LA lc h em y, w hat w ould y o u d o
dif f e re ntly ?

Bayer
: T here w ere s o m e m is ta ke s th at I m ade, w hic h le d to s ce nario s
th at u lt im ate ly b enefit e d
th e p ro je ct im mense ly . S o if I h ad n ot m ade
th ose m is ta ke s, th en I'm n ot s u re h ow
th in gs w ould h ave tu rn ed o ut.
My is su e w it h c o m petit iv e ness, w hic h I'v e m entio ned, c a use d m e to h ave
poor in te ra ctio ns
ve ry e arly o n w it h s o m e o f th e c o ntr ib uto rs . C hasin g
aw ay p eople w ho h ad g ood id eas,
and in m any c a se s, s a w th in gs m uch
more c le arly th an I d id , w as a h uge m is ta ke .
I sh ould a ls o h ave sp ent m ore tim e re adin g o th er P yth on co de a nd
gettin g b ette r a t
usin g th e c o rre ct id io m atic p atte rn s, r a th er th an h avin g to
re tr o activ e ly fix a ll
of th e c o de o nce I le arn ed n ew th in gs a bout P yth on.
If I c o uld s ta rt o ve r w it h S Q LA lc h em y, I w ould d o o th er th in gs d if f e re ntly
to o. T here
were a lo t o f d esig n p atte rn s th at w ere in th e 0 .1 v e rs io n th at I
tr ie d to g et rid
of b y v e rs io n 0 .2 o r 0 .3 . I c o uld n't re m ove th ose p atte rn s
to ta lly .
Vers io n 0.1 re lie d heavily on th e im plic it asso cia tio n of obje cts w it h
data base c o nnectio ns,
both a t th e c o re a nd O RM le ve ls . T o day, tw o o f
th ese patte rn s still exis t as bound
meta data and co nnectio nle ss
exe cu tio n. T hese patte rn s re m ain extr e m ely popula r, but
co ntin ue to
cre ate s u btle c o nfu sio n, in c o ntr a st to th e n ew er p atte rn s th at a re b ase d
on e xp lic it n ess.
Mik e B ayer: 'H ad I b een s ta rtin g w it h w hat I k n ow t o day,
SQ LA lc h em y w ould h ave b een
much c lo ser t o t h e m ark t o b eg in
wit h .'
There a re m any o th er A PI p atte rn s th at h ave b een h eavily re vis e d o ve r
th e y e ars . H ad
I b een s ta rtin g w it h w hat I k n ow to day, th en S Q LA lc h em y
would h ave b een m uch c lo se r
to th e m ark to b egin w it h . T here w ould
have been no need to go th ro ugh m ajo r A PI ch anges
in th e early
re le ase s.
I a ls o s h ould h ave re co gniz e d th e n eed fo r a g ood S Q L m ig ra tio ns to ol
early o n, a lt h ough
sq la lc h em y-m ig ra te d id a g ood jo b o f h andlin g th is
until I h ad tim e to c re ate A le m bic
mig ra tio ns.

Dris co ll
: W hat h ave y o u le arn ed fr o m
cre atin g o pen s o urc e p ro je cts ?
Bayer
: W ell, fo r o ne th in g, if y o ur o pen s o urc e p ro je ct tu rn s o ut to b e
popula r, th en it
will n eve r b e fin is h ed. If y o ur p ro je ct is lin ke d to s o m e s e t
of c o nsta ntly c h angin g
te ch nolo gy, lik e P yth on d ata base A PIs , th en y o ur
work w ill n eve r b e d one.
Mik e B ayer: 'I f y o ur o pen s o urc e p ro je ct t u rn s o ut t o b e p opula r,
th en it w ill n ever
be f in is h ed .'
I h ad n o id ea th at th e p ace o f
bug fix in g w ould re m ain c o nsta nt fo r o ve r
te n y e ars . I h ave a ls o le arn ed th at to b e
su cce ssfu l in o pen s o urc e , y o u
do h ave to h ave a lo t o f lu ck. Y ou m ust b e fo rtu nate
enough to b e d oin g a
pro je ct a t th e rig ht tim e. I g ot in to P yth on m uch e arlie r th an
most o f th e
co m munit y a nd p ro duce d m y s o ftw are a t th e p erfe ct tim e.
Fin ally , I'v e le arn ed a lo t a bout th e c a lc u lu s th at y o u m ust a pply w hen a
use r w ants
so m e fe atu re , o r b ehavio r X . Y ou c a n't re ally ta ke th em a t
th eir w ord . O fte n, w hen
use rs th in k th at th ey w ant X , th ey re ally w ant Y .
Som etim es th ey th in k th at th ey w ant
X, b ut th ey h ave n't th ought th ro ugh
th e r a m if ic a tio ns.
You a lw ays h ave to b e v e ry c a re fu l a bout h ow y o u g o a bout a ddin g X . A t
th e s a m e tim e,
yo u d on't w ant th e u se r to b e u pse t if y o u a re d enyin g
th eir fe atu re re quest. A bove
all, a s th e m ain ta in er, y o u n eed to b e a s
co urte ous a s p ossib le . T his is e xtr e m ely
dif f ic u lt , b eca use lo ts o f u se rs
are p re tty d is re sp ectfu l a nd e ntit le d. Y ou g ain n oth in g
by v e ntin g a bout
th is th ough.
Dris co ll
: W e'r e se ein g
Pyth on bein g use d a lo t in A I and m ach in e
le arn in g. W hy d o y o u
th in k th at P yth on is s u ch a g re at la nguage fo r th is ?
Bayer
: W hat w e'r e doin g in th at fie ld is deve lo pin g our m ath and
alg orit h m s. W e'r e p uttin g
th e a lg orit h m s th at w e d efin it e ly w ant to k e ep
and o ptim iz e in to lib ra rie s s u ch a s
scik it - le arn . T hen w e'r e c o ntin uin g to
it e ra te a nd s h are n ote s o n h ow w e o rg aniz e
and th in k a bout th e d ata .

Mik e B ayer: 'A h ig h-le vel s crip tin g la n guag e is id eal f o r A I a n d
mach in e le arn in g,
becau se w e c an q uic kly m ove t h in gs a ro und a n d
tr y a g ain .'
A h ig h-le ve l scrip tin g la nguage is id eal fo r A I a nd m ach in e le arn in g,
beca use w e c a n
quic kly m ove th in gs a ro und a nd tr y a gain . T he c o de th at
we c re ate s p ends m ost o f it s
lin es o n re pre se ntin g th e a ctu al m ath a nd
data s tr u ctu re s, n ot o n b oile rp la te .
A s crip tin g la nguage lik e P yth on is e ve n b ette r, b eca use it is s tr ic t a nd
co nsis te nt.
Eve ry o ne ca n u nders ta nd e ach o th er's P yth on co de m uch
bette r th an th ey c o uld in s o m e
oth er la nguage th at h as c o nfu sin g a nd
in co nsis te nt p ro gra m min g p ara dig m s.
The a va ila bilit y o f to ols lik e IP yth on n ote book h as m ade it p ossib le to
it e ra te a nd
sh are o ur m ath a nd a lg orit h m s o n a w hole n ew le ve l. P yth on
em phasiz e s th e c o re o f
th e w ork th at w e'r e tr y in g to d o a nd c o m ple te ly
min im iz e s e ve ry th in g e ls e a bout h ow
we g iv e th e c o m pute r in str u ctio ns,
whic h is h ow it sh ould b e. A uto m ate w hate ve r yo u
don't n eed to b e
th in kin g a bout.
Mik e B ayer: 'A uto m ate w hate ver y o u d on't n eed t o b e t h in kin g
ab out.'
Dris co ll
: H ow d o y o u th in k th at
Pyth on c o uld b e a b ette r la nguage fo r
A I
and m ach in e le arn in g?
Bayer
: M ach in e le arn in g is a C PU in te nsiv e ta sk, s o w e n eed to c o ntin ue
it e ra tin g o n h ow
to m ake b ette r u se o f a ll o f th ose p ro ce sso r c o re s, w hic h
unfo rtu nate ly m eans th e
Glo bal In te rp re te r L ock (G IL ). R ig ht n ow , th e
only w ay to d o th at is to u se m ult ip ro ce ssin g.
Mik e B ayer: 'P yth on s till la cks a d ecen t c o ncu rre n cy p ara d ig m .'
Pyth on still la cks a d ece nt co ncu rre ncy p ara dig m th at is so m ew here

betw een th re ads,
where P yth on's d yn am ic c o ntr a ct m eans th at w e h ave
a G IL a nd p ro ce sse s, w hic h in cu r
co m ple xit y a nd e xp ense r e gard in g h ow
to s h are d ata . It m ig ht b e h elp fu l to h ave a n
in te rp re te r c o nce pt th at a cts
la rg ely lik e m ult ip ro ce ssin g, but is so m ehow doin g it
wit h in a sin gle
pro ce ss s p ace . T his c o nce pt w ould u se O S-le ve l th re ads, y e t s till
ke ep
th e p ro ce sse s is o la te d e nough th at th ey d on't s h are th e s a m e G IL .
Dris co ll
: W hat advic e w ould yo u giv e to
so m eone w ho is new to
pro gra m min g in g enera l?
Bayer
: T here is a lo t o f c o nve ntio nal w is d om in c o m pute r p ro gra m min g.
You s h ould a lw ays
put c o nve ntio nal w is d om o n tr ia l.
Mik e B ayer: 'Y ou s h ould a lw ays p ut c o nven tio nal w is d om o n t r ia l.'
There are ru le s in pro gra m min g, su ch as don't use m uta ble glo bal
va ria ble s, w hic h
are a ctu ally m ore lik e tr a in in g w heels fo r b egin ners .
They a re g ood ru le s, th at h ave
a lo t o f tr u th in th em , b ut n one o f th em
apply in e ve ry c a se .
As y o u p ro gre ss fr o m b ein g a b egin ner to b ein g m ore a dva nce d, y o u
want to b e a ble
to th in k o n y o ur o w n. Y ou a ls o w ant to g ain e xp erie nce
by fin din g n ove l a nd c re ativ e
ways to s o lv e p ro ble m s. T hese id eas m ig ht
not alw ays work out, but esta blis h in g a
co re pra ctic e , of alw ays
ch alle ngin g th e s ta tu s q uo, w ill h opefu lly a llo w y o u to s e e
a g re at n ew
so lu tio n to a p ro ble m o ne d ay.
Dris co ll
: W hic h la nguage w ould yo u
re co m mend to so m eone w ho is
sta rtin g o ut in p ro gra m min g?
Bayer
: I th in k P yth on is th e b est b egin ner la nguage th at I'v e e ve r s e en.
For y o ur fir s t
fe w y e ars o f p ro gra m min g, y o u c a n ju st u se P yth on a nd
yo u'l l pro bably be doin g Ja va S crip t
as w ell, sin ce th e bro w se r is
unavo id able .
At so m e p oin t, it 's a ls o a g re at id ea to w rit e so m e kin d o f scrip tin g
la nguage in te rp re te r
or c o m pile r. A n u nders ta ndin g o f h ow in str u ctio ns
decla re d a t a h ig h le ve l, lik e a
Pyth on fu nctio n, e nd u p m anif e stin g a s

in str u ctio ns r u n b y a C PU , is a n e sse ntia l
pers p ectiv e to h ave .
Dris co ll
: W hat a bout
Pyth on to day m ost e xcit e s y o u?
Bayer
: I'm e xcit e d th at P yth on is b eco m in g th e d efa ult la nguage th at
vir tu ally e ve ry o ne
who w ants to d o th oughtfu l w ork w it h d ata c h oose s
fir s t, p artic u la rly in th e fie ld
of jo urn alis m .
Mik e B ayer: 'I lo ok f o rw ard t o a n ew c ro p o f jo urn alis ts w ho c an
pro gra m P yth on a s
well a s t h ey c an w rit e a h ead lin e.'
Jo urn alis m is b eco m in g m ore d ata -d riv e n a nd I lo ok fo rw ard to a n ew
cro p o f jo urn alis ts
who c a n p ro gra m P yth on a s w ell a s th ey c a n w rit e a
headlin e. W e n eed jo urn alis ts w ho
ca n p ro duce s to rie s th at a re b ase d o n
data fr o m th e g ro und u p. T his w ill h opefu lly
le ad to m ore d ata b ein g
ava ila ble a s th e d em and in cre ase s. Im agin e if e ach tim e w e
re ad a s to ry
in th e W ash in gto n P ost, th ere w as a ls o a n IP yth on n ote book rig ht th ere ,
whic h w e c o uld u se to a naly ze th e d ata in th e s to ry .
Dris co ll
: S hould p eople n ow le ave P yth on 2 .7 b ehin d?
Bayer
: M ovin g fr o m P yth on 2 .7 is a p ro ble m th at w ill s o lv e it s e lf . I th in k
th at p eople
in th e d ata fie ld a re d efin it e ly s ta rtin g w it h th e 3 .x s e rie s n ow .
In th e in fr a str u ctu re
world th at I w ork in , w e a re u nders ta ndably ta kin g a
lo t lo nger to g et th ere , b ut
we w ill.
Mik e B ayer: 'M ovin g f r o m P yth on 2 .7 is a p ro ble m t h at w ill s o lv e
it s elf . I t h in k t h at
peo ple in t h e d ata f ie ld a re d efin it e ly s ta rtin g w it h
th e 3 .x s erie s n ow .'
Dris co ll
: W hat a re s o m e c h anges th at y o u'r e h opin g to s e e in fu tu re
Pyth on r e le ase s?
Bayer
: T o b e h onest, in th e
fu tu re I'd lik e to s e e le ss e m phasis o n th e
asyncio
s yste m , w hic h I b elie ve is a w id ely m is u nders to od A PI.

New p ro gra m mers a re s ta rtin g th eir p ro je cts u sin g a syn c fo r th e e ntir e
syste m end-to -e nd.
They are cre atin g buggy and ove rly co m plic a te d
applic a tio ns a s a re su lt , w hic h d on't
perfo rm a ny b ette r th an th ey w ould
usin g tr a dit io nal te ch niq ues.
There is d efin it e ly a p la ce fo r a syn ch ro nous I/O , b ut in v ir tu ally a ny re al-
world
applic a tio n, it sh ould b e lim it e d to d ealin g w it h in te ra ctio n w it h
exte rn al re so urc e s
and c lie nts . T his s h ould o nly b e w hen th e s ca le o f
exte rn al d ata in te ra ctio n w ill
be v e ry w id e a nd c o ncu rre nt (e .g . s cra pin g
th ousa nds of w ebsit e s, or w ait in g fo r co m mands
fr o m th ousa nds of
clie nts ).
The c e ntr a l e ngin es o f o ur a pplic a tio ns (th ose w hic h a re in te ra ctin g w it h
lo ca l d ata
and d oin g o ur b usin ess lo gic a nd a lg orit h m s), s h ould b e w rit te n
wit h tr a dit io nal th re adin g.
Asyn ch ro nous a nd s yn ch ro nous c o m ponents
ca n ta lk to e ach o th er q uit e w ell, h ow eve r
th e p ro gra m mer n eeds to
unders ta nd b oth p ara dig m s w ell. T he cu rre nt a syn c cu lt u re
does not
em phasiz e th is a t a ll.
Dris co ll
: T hank y o u, M ik e B aye r.

C hap te r 2 0. J ake V an derp la s
J a ke V anderp la s
is a data scie ntis t and th e auth or of
Pyth on D ata
S cie nce H andbook
. H e is a d ir e cto r o f o pen s o ftw are fo r th e U niv e rs it y o f
W ash in gto n's e S cie nce In stit u te ,
where h e w ork s w it h r e se arc h ers fr o m a
v a rie ty of dis cip lin es. P re vio us ro le s at th e
Univ e rs it y of W ash in gto n
i n clu de d ir e cto r o f re se arc h in p hysic a l scie nce s. Ja ke is
a lo ng-tim e
c o ntr ib uto r to th e P yth on s cie ntif ic s ta ck a nd h as w ork e d o n p ro je cts
su ch
a s SciP y, scik it - le arn and Alt a ir . He re gula rly sp eaks at Pyth on
c o nfe re nce s
in th e U S a nd h as d eliv e re d k e yn ote s p eech es a t P yC on,
P yD ata a nd S ciP y. J a ke is a
vis it in g re se arc h er a t G oogle a nd w rit e s a
t e ch b lo g.
Dis cu ssio n t h em es: P yth on in d ata s cie n ce a n d a str o nom y.
Catc h u p w it h J ake V an derp la s h ere : @ ja kevd
M ik e D ris co ll
: C ould
yo u te ll m e a lit tle a bout y o ur b ackg ro und?
J ake V an derp la s
: I s tu die d p hysic s a s a n u nderg ra duate a nd s p ent a
f e w ye ars a fte r co lle ge w ork in g
in th e o utd oors a s a n e nvir o nm enta l
e duca to r a nd a m ounta in eerin g g uid e.
A fte r a fe w s u m mers s le epin g u nder th e s ta rs e ach n ig ht in C alif o rn ia 's
S ie rra N eva da,
I fe ll in lo ve w it h astr o nom y and decid ed to ta ke

adva nta ge o f m y p hysic s b ackg ro und
to h ead to g ra duate s ch ool a nd
le arn m ore .
Up u ntil m y fir s t y e ar o f g ra duate s ch ool, I'd o nly d one a b it o f c o din g. I
had m esse d
aro und w it h H yp erC ard in m id dle s ch ool a nd ta ke n a C ++
cla ss in h ig h sch ool. I h ad
als o le arn ed so m e b asic M ath em atic a in
co lle ge.
Dris co ll
: H ow did yo u get
sta rte d usin g th e Pyth on pro gra m min g
la nguage?
Van derp la s
: A str o nom y
is v e ry c o m puta tio nally -d riv e n th ese d ays a nd s o
when I s ta rte d g ra duate s ch ool,
I n eeded to r e le arn h ow to c o de.
Jake V an derp la s: 'A str o nom y is v ery c o m puta tio nally -d riv en t h ese
days...'
Most o f m y d epartm ent w as u sin g ID L in th ose d ays, b ut I w as lu cky
enough to do a
quarte r-lo ng re se arc h pro je ct w it h a pro fe sso r w ho
re co m mended P yth on. H e to ld m e
th at P yth on w as th e fu tu re a nd in
re tr o sp ect h e w as e ntir e ly c o rre ct!
I ta ught m yse lf P yth on o ve r w in te r b re ak b y w rit in g a S udoku p uzzle
so lv e r a nd th en
tu rn in g th at in to a S udoku p uzzle g enera to r. M uch la te r
on, I a rriv e d a t P yC on 2 017
and e xp la in ed w hy P yth on is lik e d a nd u se d
by s o m any s cie ntis ts .
Dris co ll
: W hat d o y o u lik e a bout P yth on?
Van derp la s
: I lik e P yth on
fir s t o f a ll b eca use it is o pen, w hic h is a h uge
adva nta ge o ve r s o m e o th er to ols fa vo re d
by a ca dem ic s (M ath em atic a ,
ID L a nd M AT LA B c o m e to m in d).
When I fir s t s ta rte d u sin g P yth on, I fo und th e s yn ta x a nd s e m antic s to b e
in cre dib ly
cle an a nd in tu it iv e , w hic h m ade c o din g fu n fo r m e in a w ay th at
it n eve r w as w hen
I w as fir s t le arn in g C ++.

Jake V an derp la s: 'I f o und P yth on's s yn ta x a n d s em an tic s t o b e
in cre d ib ly c le an a n d
in tu it iv e.'
Als o , th e s cie ntif ic P yth on e co syste m , e ve n th ough it w as fa ir ly n asce nt
when I s ta rte d,
is a h uge b oon. N o m atte r w hat y o u w ant to d o w it h
Pyth on in s cie nce , it 's lik e ly
th at s o m eone h as c re ate d a p acka ge fo r it .
Pyth on's in te ro pera bilit y w it h s o m any o th er la nguages m eans th at it c a n
act lik e
th e g lu e b etw een th e v a rio us to ols th at s cie ntis ts n eed to u se
to geth er. T hen th e
'b atte rie s in clu ded' asp ect of P yth on m eans th at
th ere 's a b uilt - in lib ra ry fo r n early
eve ry th in g a nd a th ir d -p arty lib ra ry fo r
eve ry th in g e ls e .
Jake V an derp la s: 'P yth on… can a ct lik e t h e g lu e b etw een t h e v ario us
to ols t h at s cie n tis ts
need t o u se t o geth er.'
Pyth on's sim ple and dyn am ic natu re m ake s it perfe ct fo r day-to -d ay
scie ntif ic d ata
exp lo ra tio n, w here s p eed o f d eve lo pm ent is p rim ary a nd
sp eed o f e xe cu tio n is o fte n
se co ndary .
Last b ut n ot le ast, P yth on's o pen
e th os d oes fit w ell w it h s cie nce a nd
we'r e s e ein g a n in cre asin g n um ber o f s cie ntis ts
hostin g th eir re se arc h
co de o n G it H ub a nd s im ila r s e rv ic e s, to a id in r e pro ducib ilit y .
Dris co ll
: H ow is P yth on's o pen e th os
h elp in g th e s cie ntif ic c o m munit y ?
Van derp la s
: P yth on's open eth os is a gre at m atc h fo r how scie n ce
sh ould b e d one. I m ade th e
poin t in m y k e yn ote a t P yC on 2 017 th at o ve r
th e p ast fiv e to te n y e ars , s cie ntis ts
have re ally a bso rb ed m any o f th e
best- p ra ctic e le sso ns fr o m th e o pen s o urc e c o m munit y .
Code s h arin g, v e rs io n c o ntr o l, u nit te stin g, a nd c o de d ocu m enta tio n a re
esse ntia l
fo r m akin g su re th at m odern scie nce is re pro ducib le . The
people d oin g th e b est co m puta tio nal
work in th e scie ntif ic co m munit y
have adapte d m any of th ese pra ctic e s fr o m th e open
so urc e (a nd
partic u la rly P yth on o pen s o urc e ) c o m munit y .

Dris co ll
: W hat is
Pyth on m is sin g th at w ould b e g re at fo r s cie ntis ts ?
Van derp la s
: T he b ig gest c h alle nge w it h P yth on fo r s cie ntis ts is th at th e
sca lin g o f c o m puta tio n
re quir e s w rit in g c o de in a la nguage o th er th an
Pyth on.
Jake V an derp la s: 'T he b ig gest c h alle n ge w it h P yth on f o r s cie n tis ts
is t h at t h e s calin g
of c o m puta tio n r e q uir e s w rit in g c o de in a
la n guag e o th er t h an P yth on.'
To ols lik e C yth on a nd N um ba a ddre ss p art o f th is p ro ble m b y le ttin g y o u
co nve rt P yth on
or P yth on-lik e c o de to fa st c o m pile d c o de, b ut th ere is a
co gnit iv e o ve rh ead in vo lv e d
in d ecid in g w hen a nd w here to s w it c h to
th ese addit io nal to ols . P yP y is pro m is in g,
but th e pro ble m is th at it
doesn 't su pport CPyth on's C-A PI, whic h th e bulk of th e
scie ntif ic
eco syste m r e quir e s.
This is w hy s o m e p eople in th e c o m munit y a re a ttr a cte d to J u lia . It's a
la nguage b uilt
fo r s cie ntif ic c o m puta tio n, w it h fa st L LV M -b ase d e xe cu tio n
built - in fr o m th e g ro und
up. T hat s a id , J u lia fe els a b it c lu nky to m e in
so m e a re as a nd I w is h w e c o uld h ave
a h appy m ediu m : P yth on's s yn ta x
wit h J u lia 's p erfo rm ance .
Dris co ll
: H ow c a n th e P yth on c o m munit y h elp th e s cie ntif ic c o m munit y to
le arn P yth on? W hat
pro je cts a re y o u c u rre ntly u sin g P yth on in ?
Van derp la s
: I d o a ll o f m y
daily w ork in P yth on. C urre ntly I'm
in vo lv e d in
se ve ra l re se arc h pro je cts at th e U niv e rs it y of W ash in gto n (U W ). I'm
mento rin g
stu dents w ork in g o n a str o nom y a nd o n tr a nsp orta tio n-fo cu se d
data s cie nce .
I'm h elp in g to d eve lo p th e A lt a ir lib ra ry , w hic h is a P yth on in te rfa ce to th e
Vega-L it e
gra m mar o f v is u aliz a tio n. I th in k it w ill
be a g ood fit
fo r o ne o f
th e c u rre nt h ole s in th e P yth on s cie ntif ic s p ace , w hic h is e xp lo ra to ry
data
analy sis .
Jake V an derp la s: 'I g en era lly p ush P yth on...a n d t h ese d ays, I r a re ly

have t o p ush
very h ard !'
Part o f m y jo b a t U W is e sse ntia lly c o nsu lt in g w it h re se arc h ers a ro und
th e u niv e rs it y
to h elp w it h c o m puta tio nal o r s ta tis tic a l a sp ects o f th eir
re se arc h . I g enera lly p ush
Pyth on in m ost o f th ose c a se s a nd th ese d ays,
I r a re ly h ave to p ush v e ry h ard !
Dris co ll
: D o m ost a str o nom is ts d o a lo t o f c o m pute r p ro gra m min g?
Van derp la s
: C om putin g is a bso lu te ly e sse ntia l in m odern a str o nom y!
The fie ld h as, fo r th e m ost
part, m ove d b eyo nd th e ro m antic d ays o f
tr a ve lin g to re m ote peaks to peer th ro ugh
te le sco pes. Eve n w hen
obse rv in g o n-s it e , o bse rv a tio ns a re re co rd ed b y C CDs a tta ch ed
to th e
te le sco pes.
Beyo nd th at, it 's g enera lly tr u e th at a ll o f th e
easy
o bse rv a tio ns h ave
alr e ady b een m ade. To re ally p ush fo rw ard o ur u nders ta ndin g o f
th e
univ e rs e r e quir e s n ove l s tu die s. T hat n ove lt y m ig ht m ean o bse rv in g v e ry
fa in t
obje cts (in w hic h c a se d eta ile d n ois e m odels a re a n ece ssit y ), o r
obse rv in g m any o bje cts
to le arn a bout th eir s ta tis tic a l p ro pertie s ( in w hic h
a s ca la ble c o m putin g e nvir o nm ent
is e sse ntia l) .
At e it h er e nd o f th at s p ectr u m , y o u b ette r k n ow h ow to w rit e c o de to
in gest te le sco pe
im ages, m odel th e in te re stin g fe atu re a nd s p it o ut u se fu l
re su lt s .
Dris co ll
: H ow c o m mon is it fo r s cie ntis ts to n eed to w rit e c o de?
Van derp la s
: Lik e in astr o nom y, scie ntis ts in m ost fie ld s are fin d in g
co din g to b e e sse ntia l.
Jake V an derp la s: 'S cie n tis ts in m ost f ie ld s a re f in din g c o din g t o b e
essen tia l.'
We a str o nom ers h ave b een a b it a head o f th e c u rv e w hen it c o m es to
data vo lu m es, b ut
as se nso rs , ca m era s, sa te llit e s and oth er devic e s
beco m e c h eaper a nd m ore a bundant,
th e
data d elu ge
is s ta rtin g to b e a

fe atu re in m ost o th er d om ain s a s w ell.
Dris co ll
: W hic h
scie ntif ic fie ld s u se p ro gra m min g th e m ost?
Van derp la s
: It's v e ry h ard to s a y, b ut im mense v o lu m es o f d ata a re b ein g
pro duce d in a str o nom y.
So in r a dio a str o nom y, fo r e xa m ple , th ere a re p ro je cts th at a re p ro ducin g
data a t
ra te s o f a bout 5 G B/s . In p hysic s, th e L H C p ro duce s d ata a t a r a te
of a bout 2 5G B/s .
Then in b io sta tis tic s, g ene se quencin g d ata fo r a n
in div id ual is ty p ic a lly ~100s of
GB. All of th ese fie ld s are usin g
so phis tic a te d a lg orit h m s to e xtr a ct m eanin g fr o m
th at d ata .
Dris co ll
: O n th e o th er s id e o f th e c o in , a re y o u a w are o f a ny s cie ntif ic
fie ld s w here P yth on
is w eak in ? If s o , w hat a re th ey?
Van derp la s
: S om e fie ld s h ave lo ng h is to rie s o f in gra in ed to olc h ain s. F or
exa m ple , M AT LA B co uld
pro bably b e d escrib ed a s sta ndard in m any
engin eerin g a nd a pplie d m ath d epartm ents .
Te n ye ars a go, a la nguage ca lle d ID L d om in ate d m ost o f a str o nom y
re se arc h , but th at
has ch anged and now Pyth on is th e dom in ant
la nguage m entio ned in r e fe re ed p ublic a tio ns.
The w ay th is ch anged in astr o nom y w as tw o-fo ld . You had so m e
vis io narie s in p osit io ns
of in flu ence th at p ush ed fo r
Pyth on e arly o n (fo r
exa m ple , P erry G re enfie ld a t th e S pace Te le sco pe S cie nce In stit u te ).
Then th ere w as a re al g ro un dsw ell c o m in g fr o m g ra duate s tu dents a nd
postd ocs, w ho
work e d h ard to tr a in e ach o th er (e xa m ple s a re s o ftw are
ca rp entr y w ork sh ops a nd th e
SciC oder p ro gra m ).
Jake V an derp la s: 'T he m om en tu m o f P yth on s o rt o f t o ok o ver.'
There has als o been a co m munit y -w id e push to sta ndard iz e th e
astr o nom y P yth on to ol
sta ck. T he re su lt is th e (p henom enal) A str o py
pro je ct. B eyo nd th at, th e m om entu m o f
Pyth on s o rt o f to ok o ve r.
Dris co ll
: T hank y o u, J a ke V anderp la s.

O th er B ooks Y o u M ay E njo y
I f y o u e njo ye d th is b ook, y o u m ay b e in te re ste d in th ese o th er b ooks b y
P ackt:
P yth on M ach in e L earn in g - S eco nd E dit io n
S ebastia n R asch ka , V ahid M ir ja lili
I S BN : 9 78-1 -7 8712-5 93-3
Unders ta nd th e k e y fr a m ew ork s in d ata s cie nce , m ach in e le arn in g,
and d eep le arn in g
Harn ess th e p ow er o f th e la te st P yth on o pen so urc e lib ra rie s in
mach in e le arn in g
Maste r m ach in e le arn in g te ch niq ues usin g ch alle ngin g re al- w orld
data
Maste r d eep n eura l n etw ork im ple m enta tio n u sin g th e T e nso rF lo w
lib ra ry
Ask n ew q uestio ns o f y o ur d ata th ro ugh m ach in e le arn in g m odels
and n eura l n etw ork s
Learn th e m ech anic s o f c la ssif ic a tio n a lg orit h m s to im ple m ent th e
best to ol fo r th e
jo b
Pre dic t c o ntin uous ta rg et o utc o m es u sin g r e gre ssio n a naly sis
Unco ve r h id den p atte rn s a nd s tr u ctu re s in d ata w it h c lu ste rin g
Delv e d eeper in to te xtu al a nd so cia l m edia d ata u sin g se ntim ent
analy sis

Artif ic ia l In te llig en ce w it h P yth on
Pra te ek J o sh i
IS BN : 9 78-1 -7 8646-4 39-2
Realiz e d if f e re nt c la ssif ic a tio n a nd r e gre ssio n te ch niq ues
Unders ta nd th e co nce pt of clu ste rin g and how to use it to
auto m atic a lly s e gm ent d ata
See h ow to b uild a n in te llig ent r e co m mender s yste m
Unders ta nd lo gic p ro gra m min g a nd h ow to u se it
Build a uto m atic s p eech r e co gnit io n s yste m s
Unders ta nd th e b asic s o f h euris tic s e arc h a nd g enetic p ro gra m min g
Deve lo p g am es u sin g A rtif ic ia l In te llig ence
Learn h ow r e in fo rc e m ent le arn in g w ork s
Dis co ve r h ow to b uild in te llig ent a pplic a tio ns c e nte re d o n im ages,
te xt, a nd tim e
se rie s d ata
See h ow to u se deep le arn in g alg orit h m s a nd build a pplic a tio ns
base d o n it

U nders ta n din g S oftw are
M ax K anat- A le xa nder
I S BN : 9 78-1 -7 8862-8 81-5
See h ow to b rin g s im plic it y a nd s u cce ss to y o ur p ro gra m min g w orld
Clu es to c o m ple xit y - a nd h ow to b uild e xce lle nt s o ftw are
Sim plic it y a nd s o ftw are d esig n
Prin cip le s fo r p ro gra m mers
The s e cre ts o f r o cksta r p ro gra m mers
Max’s v ie w s a nd in te rp re ta tio n o f th e S oftw are in dustr y
Why P ro gra m mers s u ck a nd h ow to s u ck le ss a s a p ro gra m mer
Softw are d esig n in tw o s e nte nce s
What is a b ug? G o d eep in to d ebuggin g

L eave a r e vie w - le t o th er r e ad ers
k n ow w hat y o u t h in k
P le ase s h are y o ur th oughts o n th is b ook w it h o th ers b y le avin g a re vie w
o n th e sit e
th at yo u b ought it fr o m . If yo u p urc h ase d th e b ook fr o m
A m azo n, ple ase le ave us an
honest re vie w on th is book’s A m azo n
p age. T his is v it a l s o th at o th er p ote ntia l re aders
ca n s e e a nd u se y o ur
u nbia se d o pin io n to m ake p urc h asin g d ecis io ns, w e c a n u nders ta nd
what
o ur c u sto m ers th in k a bout o ur p ro ducts , a nd o ur a uth ors c a n s e e y o ur
f e edback
on th e tit le th at th ey h ave w ork e d w it h P ackt to c re ate . It w ill
o nly ta ke a fe w m in ute s
of y o ur tim e, b ut is v a lu able to o th er p ote ntia l
c u sto m ers , o ur a uth ors , a nd P ackt.
Thank y o u!

Сообщить о нарушении / Abuse

Все документы на сайте взяты из открытых источников, которые размещаются пользователями. Приносим свои глубочайшие извинения, если Ваш документ был опубликован без Вашего на то согласия.