Attention is currently required from: fixeria.
2 comments:
File pySim/esim/saip/personalization.py:
Patch Set #4, Line 40: This class is abstract, you will only use subclasses in practice.
This is exactly what `abc.ABC` is for. […]
(let's keep one of the two conversations; closing this one)
Patch Set #4, Line 42: Subclasses have to implement the apply_val() classmethods
... and this would have been obvious if you just defined it as follows: […]
when i tried to detect whether a class is abstract, it didn't work.
I think i tried introspect.isabstract() or similar.
There is no need to enforce the abstractness. It's fine to call the abstract method, even. it is only "semantically" abstract, not in the strict language sense, like in C++ where a function pointer is actually NULL.
In the code I'm working with, there are tons of abstract methods, but i see no abc.
If I don't need enforcing, it doesn't work as is_abstract(), and i can just write "abstract" in the comment, then i can reduce this code cruft without any disadvantage.
right?
To view, visit change 39742. To unsubscribe, or for help writing mail filters, visit settings.