so basically...
what I want to do is identify the function calling the dynamically created/referenced class
let's put this simple...
I have 2 functions, both of which either create or reference the same class based on an input...
this function then returns the class with specifically set parameters. (not an instance of a class)
to put this into action:
bu8() #a function which returns a bu8 object by reading data from an external source
#actually I'm purposfully explaining it wrong:
# bu8=bu(1)
# type(bu8())==bu(1) >>> True
BU8() #a function which creates a bu8 object out of a given value (boxing it to avoid memory errors)
the functions behind these should actually be clear enough:
bu() #enable external i/o
BU() #disable external i/o (disable the default *read* input and throw an error if called as such)
#bu(1)() >>> 1 byte of data read from an external source
#BU(1)() >>> TypeError: an int is required
#type(bu(1)())==type(BU(1)(0)) >>> True
I'm not sure what I'm doing wrong...
I'm trying to pull it off using a pre-defined variable and resetting it when calling the base-functions,
but that doesn't seem to be working >_>
classes = {} #dynamically created classes
#class reference: (on existing class)
classes[byte_size].enableIO = False #<-- not working
#in the class, after final operations: (after storing it's validated value)
this.enableIO = True
can anyone help??
what's currntly happening is both functions disable data I/O