[orm-devel] SelectByPrimaryKey problem

Diedrich Vorberg orm-devel@mailman.tux4web.de
Mon, 3 Mar 2003 14:01:41 +0100


>No problem, BUT why bother with the IllegalPrimaryKey exception, I don't 
>think we will ever get this, as fetchone will complain.
fetchone() will return None. I've decided to create the exception 
instead of returning None to the caller, because imho passing an 
illegal key should be considered an error condition and that's 
represented better by an exception than by an if x is None: clause.

Diedrich

-- 
           _..._                            Diedrich Vorberg
         .'     '.
        /  _   _  \                         http://www.tux4web.de
        | (o)_(o) |                         info@tux4web.de
         \(     ) /            .---.
         //'._.'\ \           /     \       Internet Dienstleistungen
        //   .   \ \          \.@-@./       und 'Consulting'.
       ||   .     \ \         /`\_/`\
       |\   :     / |        //  _  \\      Linux Rules!
       \ `) '   (`  /_      | \     )|_
     _)``".____,.'"` (_    /`\_`>  <_/ \
     )     )'--'(     (    \__/'---'\__/
      '---`      `---`