perl to python

Andy Baker andy at andybak.net
Thu May 13 16:08:26 EDT 2004


Here is a small feline amongst the pigeons...

Surely support for regular expressions is 'un-pythonic'?

The Python way would be to code regex's explicitly, surely?

If you like regex's then any missing awk/sed functionality could be a Python
module too?

(If you don't like regex's and never use them in Python then you have earned
the right to be consistent in your dismissal of awk and sed too!)

> -----Original Message-----
> From: python-list-bounces+andy=andybak.net at python.org 
> [mailto:python-list-bounces+andy=andybak.net at python.org] On 
> Behalf Of Heather Coppersmith
> Sent: 13 May 2004 12:50
> To: python-list at python.org
> Subject: Re: perl to python
> 
> On 13 May 2004 08:37:00 +0300,
> Ville Vainio <ville at spammers.com> wrote:
> 
> > Because Python code is more readable and maintainable. That 
> is a huge 
> > win in multi-maintainer situations (which is typical in production 
> > code) ...
> 
> Agreed.
> 
> > ... You can also bump up the functionality of the script while 
> > porting, and get better reuse.
> 
> That part makes me cringe.
> 
> Port first.  Make sure the new code still passes every *old* 
> test you can find.  Write new tests against the current 
> functionality and the new code; porting inevitably leads to 
> new corner cases and language idiosyncrasies.
> 
> Bump the functionality later.
> 
> If I'm the manager and I hear, "feature X, which wasn't even 
> in the old code, is almost working; but featyre Y, which was 
> in the old code, seems to be broken," then heads will roll.
> 
> Obviously, e.g., porting an OS from one hardware platform to 
> another (which I've done, more than once) will lead to 
> functionality changes, but there had better not be any 
> bumping until you know that the port is at least as solid as 
> the original.
> 
> Most of the time, though, it's the other way around:  you 
> find bugs in the old code due to the new scrutiny, but then 
> you have the nasty problem of determining whether or not 
> something else depends on the buggy behavior (but that's a 
> better topic for a new thread on another newsgroup).  At that 
> point, bumping the functionality during the port could be 
> extremely troublesome.
> 
> Regards,
> Heather
> 
> --
> Heather Coppersmith
> That's not right; that's not even wrong. -- Wolfgang Pauli
> --
> http://mail.python.org/mailman/listinfo/python-list
> 





More information about the Python-list mailing list