Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.
duncan.booth at invalid.invalid
Thu Feb 18 10:23:29 CET 2010
Jonathan Gardner <jgardner at jonathangardner.net> wrote:
> On Feb 17, 12:02 am, Lawrence D'Oliveiro <l... at geek-
> central.gen.new_zealand> wrote:
>> In message
>> <8ca440b2-6094-4b35-80c5-81d000517... at v20g2000prb.googlegroups.com>,
>> Jonathan Gardner wrote:
>> > I used to think anonymous functions (AKA blocks, etc...) would be a
>> > nice feature for Python.
>> > Then I looked at a stack trace from a different programming
>> > language with lots of anonymous functions. (I believe it was perl.)
>> Didnt it have source line numbers in it?
>> What more do you need?
> I don't know, but I tend to find the name of the function I called to
> be useful. It's much more memorable than line numbers, particularly
> when line numbers keep changing.
> I doubt it's just me, though.
Some problems with using just line numbers to track errors:
In any language it isn't much use if you get a bug report from a shipped
program that says there was an error on line 793 but no report of
exactly which version of the shipped code was being run.
error it reports line number but not filename, so you have to guess
which of the HTML page or one of many included files actually had the
error. Plus the line number that is reported is often slightly off.
uncompressed and eval'd. That makes line numbers completely useless for
tracking down bugs as you'll always get the line number of the eval.
almost every function listed in a backtrace as 'Anonymous'.
Duncan Booth http://kupuguy.blogspot.com
More information about the Python-list