So the situation is that I have a common C # class named Foo with the template parameter T , which has a new() constraint. I declared my classes something like this:
class Baz { public Baz() { } } class Foo<T> where T : Baz, new() {
And in Python:
class Bar(Baz): def __init__(self): """ do various things here """
However, if in Python I try to execute Foo[Bar] , I get an error message indicating that my Bar class violates the restrictions (namely the new() restriction on Foo<T> .
What gives?
source share