A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-December/151305.html below:

[Python-Dev] Make __class_getitem__ a class method

[Python-Dev] Make __class_getitem__ a class method [Python-Dev] Make __class_getitem__ a class methodSerhiy Storchaka storchaka at gmail.com
Fri Dec 15 13:35:46 EST 2017
15.12.17 20:02, Yury Selivanov пише:
> But nobody decorates __new__ with a @staticmethod.  And making
> __class_getitem__ a @classmethod will only confuse users -- that's all
> I'm saying.
> 
> So I'm +1 to keep the things exactly as they are now.  It would be
> great do document that in order to implement __class_getitem__ in C
> one should add it as METH_STATIC.  I also think we should merge your
> PR that tests that it works the way it's expected.

In this case I suggest to make __class_getitem__ an automatic class 
method like __init_subclass__.

The number of special cases bothers me.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4