Simbaclaws
TTCTheo's Typesafe Cult
•Created by Simbaclaws on 1/11/2025 in #questions
Python issue with inheritence
I'm trying to check if a inherited class is an instance of it's superclass. But the inherited class and the super class are in separate files.
I'm importing the inherited class with importlib as a dynamic import.
So for example:
python1.py:
python2.py:
python3.py:
This prints: MyInheritedClass isn't an instance of MySuperClass
Does anyone know why that is the case?
4 replies
TTCTheo's Typesafe Cult
•Created by Simbaclaws on 1/3/2025 in #questions
How do I parse this using python and langchain's WebBaseLoader?
Hi, I'm trying to do the following:
Create an or condition for SoupStrainer as bs_kwargs for WebBaseLoader where it will look for either a html tag, or a classname on all of the html tags.
Currently I have only found a way to do an and condition, where it searches html tags with the classname.
My code looks like this:
However, this causes the following error in my compiler:
I'm looking to combine 2 Soupstrainers into one without creating an and condition for the soupstrainer.
I'm not quite sure if this is possible
42 replies