Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

I know that in Java you supposed to write @Override when we override a method ,Do python have something similar?

I know that in Java you supposed to write @Override when we override a method and it also checks that you override it correctly ,Do python have something similar?

1 Answer

Nathan Tallack
Nathan Tallack
22,164 Points

Nope, but you do have to take care to understand that you are overriding the implementation of those parent class methods too.

So do take care to ensure you are not breaking anything that is required for implementation. You may need to call the super() of the original method.

In short, be sure to know what you are doing, however, and document why you are completely overwriting the method.