Advertisement
horozov86

Document_Management_Class_Category

Jul 10th, 2023
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. class Category:
  2.     def __init__(self, id, name):
  3.         self.id = id
  4.         self.name = name
  5.        
  6.     def edit(self, new_name):
  7.         self.name = new_name
  8.        
  9.     def __repr__(self):
  10.         return f"Category {self.id}: {self.name}"
  11.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement