for convenience

Paul Bryan pbryan at anode.ca
Mon Mar 21 17:24:36 EDT 2022


Assuming `bpy` is a module, you're creating a new attribute in your
module, `context`, that contains a reference to the same object that is
referenced in the `context` attribute in the `bpy` module.

On Mon, 2022-03-21 at 22:12 +0100, Paul St George wrote:
> 
> When I am writing code, I often do things like this:
> 
> context = bpy.context  # convenience
> 
> then whenever I need bpy.context, I only need to write context
> 
> 
> Here’s my question:
> 
> When I forget to use the convenient shorter form 
> 
> why is bpy.context not interpreted as bpy.bpy.context?
> 
> 
>> Paul St George
> 
> 
> 
> 
> 



More information about the Python-list mailing list