A Mountain of Perl Books + Python Advocacy
tony summerfelt
tsummerfelt1 at myspleenhome.com
Tue May 9 12:52:28 EDT 2000
On 08 May 2000 19:11:22 -0400, David Bolen wrote:
> although perhaps doing so is not always of benefit for long
> term maintainability and manageability.
this is a regular argument against perl programming. personally i think the
point is moot, if you can program in perl, you can read your code. i can
still ready all the uncommented c code i wrote ten years ago :)
> lastline = None
>
> while 1:
> curline = input.readline()
> if not curline: break
>
> if curline != lastline:
> uniq.append(curline)
> lastline = curline
correct me if i'm wrong, but a duplicate of the last line is what's checked?
the code i posted (typos and all) the duplicate items could have been
anyhere in the file:
one
one
two
three
or:
one
two
three
one
the perl's hashes make that possible
> Aside from the obvious brevity win of the "while <in>" notation of
actually that code could have been turned into a oneliner easily enough
> syntax) which has drawn me to Python over Perl.
i like the idea of python for larger projects.
> All lowercase text is inherently harder to read and parse visually,
i've never understood this either :) i don't have any trouble. But for
questions I really wanted answered, I make sure I puncuate properly.
--
*----------------------------------------
|
|http://members.home.net/tsummerfelt1
|
|remove myspleen to email
|
*-----------------------
More information about the Python-list
mailing list