Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: archiving mail



>>>>> "Simon" == Simon Cozens <simon@example.com> writes:

    Simon> Well, you've just been getting your Perl from the wrong
    Simon> people. :)

Which is 90% of the Perl programmers out there, except for the Debian
crew, when it shoots up to 100%?  There is a _lot_ of bad Perl out
there; even some of Jeffry's stuff could get yuguly.

    Simon> Perl is meant to be, and generally is, pretty
    Simon> self-evident. None of this kind of crap:

    Simon>     def read(self):
    Simon>         import urllib
    Simon>         self.parse(urllib.urlopen(self.url).readlines())

No reason you can't write that as

    def read (self):
        from urllib import urlopen
        handle = urlopen (self.url)
        lines = handle.readlines()
        self.parse (lines)

although I rather suspect somebody screwed the interface badly, and
probably the read() function is redundant, and what should really
happen is

    import urllib
    import xmllib

    simon = urllib.Homepage("http://cozens.net/")
    flow_object_tree = xmllib.parse(simon.get())

Of course, I'm sure in Perl it's equally easy to write.  It's just
illegal to write that many lines of code in Perl with no regexps.  :)

    Simon>     The frumious Pythonatch! 

Python?  Naturally!

You got that portmanteau right.  :-)

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."
-----------------------------------------------------------------------
Next Technical Meeting: July 8 (Sat)  13:30  Place: LinuxProbe Hall
Next Nomikai meeting: August 18 (Fri) 19:00  Place: TBD
-----------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links