On Sat, Jul 20, 2002 at 10:13:34AM -0400, Guido van Rossum wrote: > > It seems like a strange design decision to put the burden on all iterator > > implementers to write a dummy method returning self instead of just checking > > if tp_iter==NULL in PyObject_GetIter. It's like requiring all class writers > > to write a dummy __str__ method that calls __repr__ instead of implementing > > the automatic fallback to __repr__ in PyObject_Str when no __str__ is > > available. > > I suppose you meant "check for tp_iter==NULL and tp_iternext!=NULL. Yes. Any comments on my analogy of __iter__/next with __str__/__repr__ and the burden of implementation? Oren
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