psss...I want to move from Perl to Python

Rustom Mody rustompmody at gmail.com
Fri Jan 29 22:38:05 EST 2016


On Saturday, January 30, 2016 at 3:01:09 AM UTC+5:30, Rick Johnson wrote:
> On Friday, January 29, 2016 at 6:21:21 AM UTC-6, Ulli Horlacher wrote:
> > I nearly gave up with Python at the very beginning before
> > I realised that OO-programming is optional in Python! :-)
> > Most tutorials I found so far makes OO mandatory.
> 
> Just more evidence that old dogs are incapable of learning
> new tricks. Either learn how to wield Neuroplasticity to
> your advantage, or go curl up into a ball and wait for death
> to come. People who are unwilling to "expanding their
> intellectual horizons" make me sick!!!

JFTR:
[Ranting] Rick is someone who I sometimes agree with were it not for the ranting style.

In this case I think its more important to rebut the contents of the rant than
the emotion-BS, especially given that one of the questions of the OP was re 're'.

Somebody said above that the re in python needs to be 'compiled' unlike perl.
Also if you see the docs they are mostly match/search orientated.

Both these are unnecessary OO-gook

1. One can use string-re's instead of compiled re's
2. One can use findall instead of search/match
3. One can do 
from re import findall
findall(...)

rather than

import re
re.findall(...)


1. By using string-res one need not create opaque re OBJECTS
2. By using findall one need not fish around in opaque match objects
3. By using from ... import one can reduce OO dotodotodotomania

In short python can be much less OO than is typically presented



More information about the Python-list mailing list