Author serhiy.storchaka
Recipients Matt Gilson, mgilson, rhettinger, serhiy.storchaka
Date 2017-05-12.20:01:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494619319.22.0.715065524607.issue30346@psf.upfronthosting.co.za>
In-reply-to
Content
I agree and prefer #1. This will save users from incorrect using and us from reports about odd behavior.

The implementation is simple. The groupby object generates an unique identifier when creates a new grouper. This may be a sequential integer, just object(), or the grouper object itself (but the latter case creates a reference loop). The grouper object saves the parent's identifier when created and compare the owned reference with the current parent's identifier before every use (in __next__ and __reduce__). If they don't match, the grouper object is not valid.
History
Date User Action Args
2017-05-12 20:01:59serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, mgilson, Matt Gilson
2017-05-12 20:01:59serhiy.storchakasetmessageid: <1494619319.22.0.715065524607.issue30346@psf.upfronthosting.co.za>
2017-05-12 20:01:59serhiy.storchakalinkissue30346 messages
2017-05-12 20:01:59serhiy.storchakacreate