On 3/14/23 18:50, Rob Cliffe wrote:
On 14/03/2023 21:28, avi.e.gr...@gmail.com wrote:


Type hints are actually situationally quite useful (though yes, kind of hard to understand when you first come across their use, largely because of things like Union). And I wouldn't recommend their use in all situations because maintaining them is frustrating.

xmlschema uses them extensively though and I appreciate them. The module does what I need where all the other offerings failed, and parsing the source because of the subject matter would have been harder to quickly grok without them.

Alternatively, I spent quite a while on the subject of pep 232 (before finding the pep) trying to understand it because intuitively I felt like there was something I must be missing. Turns out there isn't. And what my thoughts were assuming was the intent, are discussed under "Future Directions", but when seeing it laid out like that, subjectively the dissenting conclusion of "It opens the way to mind abuse." is more correct. "What if I launch a virtual machine inside a virtual machine inside a virtual machine inside a virtual machine, what happens?"...

If I want to have a grouping of minor functionality or attributes on a callable, I can get that with creating a class that defines __call__.

I would say 232 is fine for what it is (I don't have to use it, and in many cases it probably is), but the only wide use I know of that I have come across is in the standard library ElementTree:
# For tests and troubleshooting
register_namespace._namespace_map = _namespace_map

Which I hate that variable and it's design with a passion. lol.

And exactly, the more a language starts policing my ability to be flexible in my trying to find a creative solution to a problem, the less I want to use it. Sometimes to have something useably beautiful to interact with requires something painfully complex under the surface. Hiding and avoiding all complexity away so you never have to see it or make mistakes prevents you from growing.

Anyway, the 20th rule to The Zen of Python is:
Don't believe your own bullshit *shrug*


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to