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 Basic Object-Oriented Python Welcome to OOP Instance Attributes

Luis Gutierrez
seal-mask
.a{fill-rule:evenodd;}techdegree
Luis Gutierrez
Python Development Techdegree Student 2,695 Points

Why is the make argument from the def __init__():; Called first when it's the last parameter?

Using chatgpt without any other block of code. the def init(): suggests to be left at the end of the attributes.

1 Answer

Steven Parker
Steven Parker
231,545 Points

Be careful about using ChatGPT (or any AI) in conjunction with the lessons, as it is notorious for getting confused and providing incorrect analysis.

But I'm wondering if you stopped partway through the lesson, because at first "make" was defined as the first parameter (after "self") but later is was moved to the end. For a few minutes the calling sequence in the code still reflects the original order, but before the lesson ends it is also rearranged to place "make" last. You might notice that the code is only executed after all changes are made and not while the reordering is still being done.