Thread: OOP Probs

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Posts
    25
    Rep Power
    0

    Question OOP Probs


    I am just learning OOP and am writing this script and keep running into this problem.
    To reproduce:

    Run PUMASS_ObjLib.py
    a = []
    a.append(Schedule().Add())
    a.append(Schedule().Add())
    print a.AllDates[0]
    print a.AllDates[1]

    What happens is that when you add a new Date object, all other Date objects in the list turn into the one you just made.
    Does any1 know how to fix this?
    Attached Files

IMN logo majestic logo threadwatch logo seochat tools logo