Python Forum
The derivate class dosn't behave like the base when i pass parameter to them
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The derivate class dosn't behave like the base when i pass parameter to them
#5
Indeed :

class DefaultPlot(BasePlot) :
   
    def __init__(self, figsize,**kwargs):
        self.params = kwargs
        print(kwargs)
give me {}

while
def __call__ (self,nrows,ncols,**kwargs):
       print(kwargs)
       self.setparams(kwargs)
give me {'scheme': 'vega'}

(Aug-05-2018, 06:42 PM)volcano63 Wrote: Well, easy to miss in a messy code. You pass
           self.setparams(kwargs)
where is double asterick?

in this poiunt is not necessary the **

I fixed the things and I solved .. thanks for the hint !!
Reply


Messages In This Thread
RE: The derivate class dosn't behave like the base when i pass parameter to them - by drudox - Aug-05-2018, 06:42 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to pass encrypted pass to pyodbc script tester_V 0 911 Jul-27-2023, 12:40 AM
Last Post: tester_V
  [ERROR] ParamValidationError: Parameter validation failed: Invalid type for parameter gdbengo 3 11,353 Dec-26-2022, 08:48 AM
Last Post: ibreeden
  Calling a base class variable from an inherited class CompleteNewb 3 1,754 Jan-20-2022, 04:50 AM
Last Post: CompleteNewb
  How to pass variables from one class to another hobbyist 18 11,010 Oct-01-2021, 05:54 PM
Last Post: deanhystad
Exclamation win32com: How to pass a reference object into a COM server class Alfalfa 3 4,970 Jul-26-2021, 06:25 PM
Last Post: Alfalfa
  Importing issues with base class for inheritance riccardoob 5 4,806 May-19-2021, 05:18 PM
Last Post: snippsat
  Behavior of Abstract Base Class dgrunwal 4 2,245 Oct-15-2020, 07:19 PM
Last Post: Gribouillis
  Pass by object reference when does it behave like pass by value or reference? mczarnek 2 2,598 Sep-07-2020, 08:02 AM
Last Post: perfringo
  read a parameter after updating it in another class MKS2020 3 2,303 Jul-25-2020, 08:27 AM
Last Post: MKS2020
  Pass by reference vs Pass by value leodavinci1990 1 2,245 Nov-20-2019, 02:05 AM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020