I did the changes on local copy of this code בתאריך יום ו׳, 24 ביוני 2022 ב-11:50 מאת Chris Angelico < ros...@gmail.com>:
> On Fri, 24 Jun 2022 at 18:43, נתי שטרן <nsh...@gmail.com> wrote: > > > > class _NamedIntConstant(int): > > def __new__(cls, value, name): > > self = super(_NamedIntConstant, cls).__new__(cls, value) > > self.name = name > > return self > > > > def __repr__(self): > > return self.name > > > > __reduce__ = None > > MAXREPEAT = _NamedIntConstant(32,name=str(32)) > > > > what's the problem with the code???? > > You ripped a bunch of code from the standard library without > understanding what it does, and now it doesn't work. The problem is > more with your methodology than your code. > > Why are you doing this? Why not simply use what's there? > > If you REALLY need to make source-level changes, make *changes*, don't > try to lift small parts out. Also, you will need to spend some hours > getting to know the code that you're mutating. > > Is there an alternative newsgroup for > lazy-python-users-who-dont-want-to-do-the-w...@groups.google.com ? > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- <https://netanel.ml> -- https://mail.python.org/mailman/listinfo/python-list