Test message. Posted a question several days ago and don't see it.

2025-09-10 Thread Steve Jorgensen via Python-list
I posted a question here several days ago and received a "Welcome to the 
"Python-list" mailing list!" email, but I still don't see my question in the 
list.

I'm posting this mainly to see if it shows up, or I get a reply from a 
moderator, or something like that.
-- 
https://mail.python.org/mailman3//lists/python-list.python.org


Detailed documentation or specs for behavior of descriptors in attributes of metaclasses

2025-09-10 Thread Steve Jorgensen via Python-list
I've been experimenting to deepen my understanding of Python's behavior in 
regard to metaclasses, descriptors, and other meta-programming stuff. In the 
process, I have come across a behavior that is presumably by design but cannot 
be inferred from anything I can find in the official documentation. Because of 
that, I can't be certain whether the behavior I'm seeing is by design or just 
happens to work this way in CPython.

What I'm seeing is that, if a class and its metaclass both have assigned 
descriptors to the same attribute name, then the descriptor in the metaclass is 
employed when interacting with the attribute of the class, and the descriptor 
in the class is employed when interacting with an instance of the class.

This allows things that would not otherwise be possible, such as having a 
setter fat the class level or having different getters for a class and its 
instances.
Does anyone know of anywhere in the Python docs or PEPs that have the 
information needed to predict this behavior?
-- 
https://mail.python.org/mailman3//lists/python-list.python.org


Re: Test message. Posted a question several days ago and don't see it.

2025-09-12 Thread Steve Jorgensen via Python-list
Well, that was the more important thing to do. :)
-- 
https://mail.python.org/mailman3//lists/python-list.python.org