Python Object-Oriented Python Advanced Objects Double

Akshaan Mazumdar
Akshaan Mazumdar
3,127 Points

Code not working

How to create an int instance of whatever is passed in?
class Double (int):
    def __new__(*args,**kwargs):
        return self1

1 Answer

Steven Parker
Steven Parker
207,988 Points

You're really close! I tried pasting your code into the challenge, and it already passes task 2.

Now to pass task 3, you only need to multiply the value that your __new__ method returns.