C3M2_Assignment _, _, issue

I am using exact code from hint, but it gives error

def save_fmap(_, _, output):
                     ^
SyntaxError: duplicate argument '_' in function definition

Maybe you shouldn’t confuse users?

Ok, sorry, it looks like the hint is incorrect. But they literally gave you the actual code in the template and it is different than in the hint: the second argument is __ (two underscores, not one). Are you sure that you didn’t modify the prewritten code? I have not actually gotten to this assignment yet, but in general you only need to modify the None values in the template code. Or at least it looks that way in this instance.

Please give it a try with __ as the second argument and let us know if that helps.

I will file a bug about the incorrect hint.

Looking through that assignment, the same _, __ syntax exists earlier in the grab() function that they also wrote out for you. Did you encounter a similar problem there?

Yes, this issue is simply resolved by changing one of argument to any fake variable which you will not use anywhere: def save_fmap(fake, _, output): and it works fine. Just providing hint which you need “to debug” maybe no so good idea. We do not learn python here but pytorch :wink:

Thank you for pointing this out! I have noted this and will address this soon to avoid confusion.