Modifying specific attributes within an object in python
===

Hi everyone back again as I encountered another problem thats been driving me crazy! This is my first python class so any insight on what I might be doing wrong is much appreciated!

So I have multiple classes(Course and College). The Course class simply contains the following private data members: course no., credit hours, and instructor's name. The College class coordinates all of this data by using a dictionary. The course id is used as a key and the course objects(course no., credits, instructor) as the value. The problem I've come across is coding the method for modifying a specific courses attributes.

    class Course:
        def __init__(self, credits, instructor, course):
            self.__course = course
            self.__credits = credits
            self.__instructor = instructor
    
        def set_course(self, course):
            self.__course = course
            
        def set_credits(self, credits):
            self.__credits = credits
    
        def set_instructor(self, instructor):
            self.__instructor = instructor
    
        def get_course(self):
            return self.__course
        def get_credits(self):
            return self.__credits
        def get_instructor(self):
            return self.__instructor
        def __str__(self):
            return 'Course No.: ' + str(self.__course) + \
                   '\nCredits: ' + str(self.__credits) + \
                   '\nInstructor: ' + str(self.__instructor)

    class College:
        def __init__(self):
            self.__courses = {}

    def add_course(self):
        course = input('Enter course number: ')
        credits = int(input('Enter credits for course: '))
        instructor = input('Enter instructors name: ')
        entry = Course(credits, instructor, course)
        if course not in self.__courses:
            self.__courses[course] = entry
            courseinfo = Course(credits, instructor, course)
            print('Entry has been added')
            return self.__courses
        else:
            print('That course already exists')
       

    def modify_course(self):
        course = input('Enter course to modify: ')
        if course in self.__courses:
            print('What do you want to modify?')
            option = input('1 for credits, 2 for instructor: ')
            if option == '1':
                credits = input('Enter new value for credits: ')
                entry = Course()
                entry.__dict__[credits] = credits
    
            elif option == 2:
                instructor = input('Enter new name for instructor: ')
                entry = Course()
                entry.__dict__[instructor] = instructor
        else:
            print("That course doesn't exist")

As you can see above, within my modify_course() method in the College class I tried using: 

    objectName.__dict__[propertyName] = newValue

However, when I try this I get a TypeError with the arguments because I am only passing a single attribute through the `__init__` of the Course class. Is it possible for me to pass the old attributes I am not modifying through the `__init__` of the Course class so that I can edit a separate attribute? 


