Boshqa atributlar bilan bir qatorda, python klassida sinf haqida ma'lumot beradigan ba'zi bir o'rnatilgan sinf atributlari mavjud.
O'rnatilgan sinf atributlari quyidagi jadvalda keltirilgan:
__dict__ - Bu sinf nomlari maydoni haqidagi ma'lumotlarni o'z ichiga olgan lug'atni taqdim etadi.
__doc__ - U sinf hujjatiga ega bo'lgan qatorni o'z ichiga oladi __name__ - U sinf nomiga kirish uchun ishlatiladi.
__module__ - Ushbu sinf aniqlangan modulga kirish uchun foydalaniladi.
__bases__ - Unda barcha asosiy sinflarni o'z ichiga olgan korniş mavjud.
Misol:
class Student: def __init__(self,name,id,age): self.name = name; self.id = id; self.age = age def display_details(self): print("Name:%s, ID:%d, age:%d"%(self.name,self.id)) s = Student("John",101,22) print(s.__doc__) print(s.__dict__) print(s.__module__)