コード例 #1
0
 def __new__(cls, *args, **kwds):
     # noinspection PyProtectedMember
     if typing._geqv(cls, CounterTy):
         raise TypeError("Type CouterTy cannot be instantiated; "
                         "use counter() instead")
     return Counter.__new__(cls, *args, **kwds)