-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Enum._generate_next_value_ should be static #103056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hmm, I see that the final function stored on the completed class is either a plain function or a static method depending on how it was written in the class -- it should probably always be one or the other; I think The check and possible staticmethod conversion should be at line 531. |
Okay, so it will be a |
@ethanfurman could you, please, explain the following phrase:
|
If the function was decorated with The change implented by this patch is to wrap the |
@ethanfurman thank you! BTW, I do not understand how Ok, If I understood you correctly then I have one more question. Why not to decorate the definition of the |
@RomanSteinberg You make a good point. I have added the Thank you for your input! |
…H-103231) _gnv_ --> _generate_next_value_
…H-103231) _gnv_ --> _generate_next_value_
Bug report
Here and in two more places in the same file function
_generate_next_value_
supposed to be called for instance. But it will not work properly in that case, because it behaves like static method. Considerstaticmethod
decorator.As far as I understand there is no problem right now and all calls are correct. But in future it will be more robust if it would be static.
Linked PRs
The text was updated successfully, but these errors were encountered: