[Yum] Error updating RH8

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

 



On Wed, Jan 15, 2003 at 02:10:04PM -0500, R P Herrold wrote:
> One of the things that drives me nuts on python is that it is
> so direct in pointing out (via stack traces) that one has
> not checked all return codes. <smile>

Actually, I've grown to like it.  I find it supports very practical
open-source development.  First off, it's more "pythonic" to catch
exceptions than prevent exceptions.  For example, in c-style python,
you might do this:

if some_dict.has_key('foo'):
    print some_dict['foo']
else:
    print 'no foo for you!'

whereas in python-style python (perhaps the most suitable style for
python), you might do this:

try:
    print some_dict['foo']
except KeyError, msg:
    print 'no foo for you!'

It all amounts to about the same thing, but it's a stylistic
difference which supports my next point: For rapid-response
open-source development, don't go nuts anticipating every conceivable
exception.  Let them happen, and then wrap 'em in try's when they do.
That way, your effort gets focused where it's really needed rather
than planning for problems no one will ever have.

Eh... just a bit of musing to lengthen your day :)

					-Michael
-- 
  Michael Stenner                       Office Phone: 919-660-2513
  Duke University, Dept. of Physics       mstenner@xxxxxxxxxxxx
  Box 90305, Durham N.C. 27708-0305


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux