[Python-Dev] PySet API
Raymond Hettinger
raymond.hettinger at verizon.net
Wed Mar 29 23:29:02 CEST 2006
[Gareth McCaughan]
> For what it's worth[1], I think Raymond is absolutely on crack here.
Nope. No mind-altering drugs here. Based on real-word experience, I have found
PySet_Next() to be a bug factory and do not want it included in the API.
The story is different for PySet_Update(). Defining it now could get in the way
of possible future development for the module (the function may end-up taking a
variable length argument list instead of a single argument).
Neither of these proposals are necessary. Both have safe, simple, workable
alternatives. It is not my problem if those alternatives do not suit your
tastes. A personal aversion to the abstract api is no reason to forgo safety or
to interfere with future development of the module. Quality and flexibility
considerations trump micro-optimizations and personal style biases.
Most of the push has been predicated on being in a snit about the existing
iterator API. However, in the course of writing itertools and other Python
enchancements, I've had occassion to thoroughly exercise the iterator API and
have not found it to be a problem in practice.
Raymond
More information about the Python-Dev
mailing list