Another silly looking thing in vsc's snake oil plugin:
Having a base class with some AddItem function (which is sort of complicated, requires lots of checks/validations and bells and whistles) which is obviously void*, I made some child class and wanted to override AddItem. Which both (a) requires the base function to run, (b) makes some crucial additions/corrections afterwards. And the pie-lance thing autocompletes to
even though it's known that there is nothing to return. Well, at least the base function would be called. According to some post from 2019, the issue has been fixed. Apparently, for __init__'s only.
* " -> None" is the pythonic way of speaking of void or subroutine; at least for those who jack off to PEP-8 or zen of whatever and prefer code with underscores and without caps. And teach others what is more pythonic than something less pythonic, and be fiercely proud of it. And perhaps find frequent "typing" childish.
Yet another battle with "circular imports". Sheesh, two modules with almost 500 lines each, just fucking because two classes have to know about each other! Are you fucking with me? Plus endless hidden errors giving fake info on apparent c.i. in test exploder or expander ...
Another hidden treasure in (otherwise great!) unittest extension: when I reference another test class in order to use its function (oh, it's a method ... fuck business logic) in a test, the thing gets lost in translation and "discovers" some fictional test, so it seems. It can even run and debug that thing, but looking into source code gets us in trouble of "file not found". Workaround: just import the object you need at the top of the file, not in that single test function:
In Python, we cannot declare a variable or value as constant in Python. But we can indicate to programmers that a variable is a constant by using an all upper case variable name.Yeah, dumbass, you forgot the third "in python". Script kiddies as we used to call'ems.
Hey, wait! I can wrap the to-be-constant value in a class and throw exception at anyone that tries to set it to something else!
Mr van Possum, your braindead kid is doing great. Young, Gifted and Crude ...
Whatever it is, I'm against it.
No comments:
Post a Comment