for convenience

Paul St George email at paulstgeorge.com
Mon Mar 21 17:31:24 EDT 2022


Hi,
I do not (knowingly) have a module called ‘context'.




> On 21 Mar 2022, at 22:24, Paul Bryan <pbryan at anode.ca> wrote:
> 
> 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