Python Object-Oriented Python Advanced Objects Double

rakesh bhaskar
rakesh bhaskar
1,746 Points

cant find what wrong in my code

check my code and help me out
class Double(int):
    def __new__(**kwargs,*args):
        self =int.__new__(**kwargs,*args)
        return self

2 Answers

Steven Parker
Steven Parker
207,988 Points

You're close, but "args" always come before "kwargs".

none of this is working for me in my challenge?

class Double(int): def new(*args, **kwargs): self*args, **kwargs) return self

class int: def init_(self): return int(self.value)