[Python-ideas] Re: Add user defined __eq__ to itertools.cycle class

2020-12-31 Thread Andres Torres
Link is broken :/ It should be https://github.com/sqlalchemy/sqlalchemy/issues/5810 ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.

[Python-ideas] Re: Add user defined __eq__ to itertools.cycle class

2020-12-31 Thread Andres Torres
Yep, thanks for the explanation! After some more research into this it appears this exact situation is accounted for within the `SQLAlchemy` library (reference: https://github.com/sqlalchemy/sqlalchemy/issues/5810)! Additionally, due to the complications brought up in this thread it seems like it

[Python-ideas] Re: Add user defined __eq__ to itertools.cycle class

2020-12-31 Thread Andres Torres
Thank you for reviewing my proposal. First and foremost, let me address the use case for this feature. I have an `SQL` database where I store `itertools.cycle` objects (via pickling) and I use SQLAlchemy to interact with this database. Whenever I "update" the cycler, by calling `next` on the

[Python-ideas] Re: Add user defined __eq__ to itertools.cycle class

2020-12-30 Thread Steven D'Aprano
On Wed, Dec 30, 2020 at 05:30:52PM -0800, Andres Torres wrote: > As the title suggests, I am requesting an user defined __eq__ method for > the itertools.cycle class. A suggestion for how equivalency might work is > that __eq__ would return True if two cyclers have the same iterable and are > at