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. Advertising

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. P4trykx
    Replies:
    2
    Views:
    1,780
    bruce barker
    Jan 31, 2007
  2. 7stud
    Replies:
    11
    Views:
    662
    Dennis Lee Bieber
    Mar 20, 2007
  3. Phillip B Oldham
    Replies:
    2
    Views:
    226
    Bruno Desthuilliers
    Jun 16, 2008
  4. ako...
    Replies:
    3
    Views:
    284
    Rob Rypka
    Oct 7, 2005
  5. Replies:
    8
    Views:
    284
    Jorgen Grahn
    May 16, 2013
Loading...

Share This Page