Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Context Attributes

Hello, I Am A Beginner on Quantopian. ( Sorry For my English, I just Speak French and Python :P )
I have a question about this portion of code :

def initialize(context) :  
    context.aapl = sid(24)  

How can Quantopian create attribute to the class like this ?

If I do this :
def initialize(context) : context.aapl = sid(24) context.rgtogui = 17

I don't have any problem on the line : context.rgtogui = 17 But If I do this in Python :
class Test : def __init__(self) : pass A = Test() A.B = 15 I have an error on the line A.B = 15 ( That's logic )
How Quantopian manage the creation of attribute to context please ?
Thank you !