i'm learning python currently, coming from c++ and i realized that i can't do certain things like in C++
anyways, i created a class call Object_refs:
#attempt to make a structure like class using INIT
#to define all common variables.
class Object_refs:
def __INIT__(self, descriptor_type, type, reference_count, flags):
self.desctype = descriptor_type
self.type = type
self.refcount = reference_count
self.flags = flags
now, i can do this:
OBJREF = Object_refs #i'm tying to define the class as another variable, like a typedef in c++
in the python terminal it shows:
>> OBJREF
<class __MAIN__.Object_refs at 0x0000000001E3F888>
>>
however, i cannot do this:
>> OBJREF.type = '\u01'
AttributeError: Object_refs has no attribute type
maybe i'm not understanding python classes correctly. could somebody help me try to understand this better?