Best way to add attributes to shelved objects?

Discussion in 'Python' started by Jonathon McKitrick, Apr 23, 2004.

  1. I'm working on an app that persists a few classes with shelve. But if I
    load older saved classes, I get an exception in code that uses the new
    attributes, of course.

    What is the best way to load these older classes, check for the new
    attributes, and add them so they will work with the new code?

    jm
    --
    My other computer is your Windows box.
     
    Jonathon McKitrick, Apr 23, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer

    Best way to add to a profile at a later time?

    VB Programmer, Jan 31, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    350
    Scott Allen
    Feb 4, 2006
  2. P4trykx
    Replies:
    2
    Views:
    2,108
    bruce barker
    Jan 31, 2007
  3. 7stud
    Replies:
    11
    Views:
    1,035
    Dennis Lee Bieber
    Mar 20, 2007
  4. Allan Ebdrup
    Replies:
    5
    Views:
    578
    Steven Cheng[MSFT]
    Apr 4, 2007
  5. Replies:
    0
    Views:
    321
  6. Phillip B Oldham
    Replies:
    2
    Views:
    332
    Bruno Desthuilliers
    Jun 16, 2008
  7. ako...
    Replies:
    3
    Views:
    371
    Rob Rypka
    Oct 7, 2005
  8. Replies:
    8
    Views:
    494
    Jorgen Grahn
    May 16, 2013
Loading...