[New-bugs-announce] [issue1691] feature request: methods that modify instances should return instance

Peter Farson report at bugs.python.org
Sun Dec 23 19:48:24 CET 2007


New submission from Peter Farson:

Here's an example:
I'd like to be able to reverse a list for iterating...
for i in range(10).reverse()

This could work if reverse method returned self, but currently it
doesn't return anything.  I think the overhead is slight and worth it.

----------
components: None
messages: 58973
nosy: eukaryot
severity: normal
status: open
title: feature request: methods that modify instances should return instance
type: behavior
versions: Python 2.5

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1691>
__________________________________


More information about the New-bugs-announce mailing list