[Python-Dev] accumulator display semantics
aahz at pythoncraft.com
Thu Oct 16 13:45:26 EDT 2003
On Thu, Oct 16, 2003, Raymond Hettinger wrote:
>> I'm having a difficult time following this discussion. Would someone
>> please write a PEP once things settle down?
> Peter's link is essentially a PEP already and covers all the essentials:
Gotcha. Didn't realize he'd been summarizing the discussion. Well,
I'll hold my opinion on the whole proposal pending a PEP, but I'll make
two comments on the proposal as it stands:
* I'm strongly opposed to the return idea instead of raising
StopAccumulation (which should be a subclass of StopIteration). Using
return this way is IMO unPythonic.
* If we're using bracket notation, I think accumulators must return a
list. I think it would be a Bad Idea to permit other types (although I'm
willing for leeway to permit list subclasses).
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"It is easier to optimize correct code than to correct optimized code."
More information about the Python-Dev