Category "inheritance"

Python exception type object inheritance

I need to retrieve the name of the object in which an error has occured. The error is catched in a try exception statement. The error type as returned by err_ty

Inheritance and std::shared_ptr in Cython

Suppose I have the following simple example of C++ inheritance in file.h: class Base {}; class Derived : public Base {}; Then, the following code compiles; tha

Virtual Method not calling derived class method (only calling base class) C++

My base class detect() and collect() methods are the only ones being called. I'm trying to get the derived class methods of these to be printed instead. I belie

how to define deep copy of subclass if super class has customized deep copy

My super class A has a method copy(), which is a customized deep copy function. The sub class B wants to inherit this deep-copy function while also deep-copying

R R6 Inheritance with roxygen2 - class "ParentClass" is not exported by 'namespace:ParentPackage'

I am running into an issue with R6 inheritance. I am writing 2 packages (work related so I have to use fake code but I'll try to keep it accurate). In ParentPac

JPA Inheritance with JOINED strategy

I've seen many posts about inheritance but nothing match my problem. I try to build a correct objects model: The root class @Entity @Inheritance(strategy = I

Why do we need to typecast the WebDriver instance to JavascriptExecutor before calling the executeScript method?

JavascriptExecutor is an interface which provides some default code for executeScript method. RemoteWebDriver implements this interface and overrides the method

What exactly does super() return in Python 3? [duplicate]

From Python3's documentation super() "returns a proxy object that delegates method calls to a parent or sibling class of type." What does that

Python: overloading the `__call__` dunder method of a class that inherits Enum

Consider the following: from enum import Enum class A(int, Enum): def __new__(cls, value): def call(cls, value): print("HELLO 1" +

Flutter: List inheritance in classes

Hello guys I am new on flutter and building a new app... I have a problem that I cannot do it... I want to call elements of List from another class, I wrote so

How to correctly inherit Unity's callback functions like Awake(), Start() and Update and FixedUpdate()?

I've created a parent class that I expect to have all functions related to testing if the GameObject is grounded, in water, on air, etc... given that this funct

AttributeError: 'super' object has no attribute 'word_weighting'

I have a super class FTM: class FTM: def __init__(self,word_weighting = 'normal'): self.word_weighting = word_weighting def get_sparse_glob

Python circular imports with inheritance

I have a parent and child class, where a parent's method returns an instance of the child. Both classes are in separate files classA.py and classB.py. In order

I need to decrease a value of the property only from specific class objects

I have three classes and two of them inheriting from an Animal class, Carnivore class should have method to decrease health by 50 if I call the method on Herbiv

Treat Oracle subtype as supertype

I have a query that uses Oracle's MDSYS.ST_GEOMETRY type (link): select mdsys.st_point(1, 2, 26917) from dual Output: [MDSYS.ST_POINT] The query outp

Is it possible to inherit from class with Generic in Python?

Since Python 3.5 you can use Generics and other interesting stuff described in PEP-0484. I tried that and here's a code I have: from typing import TypeVar, Ge

Allowing two projects to inherit from the same bond

Using Microsoft Bond in a C# project. Suppose I had a Bond file A used in one project A', and wanted to have two projects B' and C' have Bond files B and C bot

How to call super method from grandchild class?

I am working with some code that has 3 levels of class inheritance. From the lowest level derived class, what is the syntax for calling a method 2 levels up th

Inherit class Worker on Odoo15

In one of my Odoo installation I need to setup the socket_timeout variable of WorkerHTTP class directly from Python code, bypassing the usage of environment var

Stack overflow error in java concerning inheritance

I am working on a project for my intro to java class and am working on inheritance. The problem is with the classes Mammal and Pet. When I run the driver clas