Re: What about an EXPLICIT naming scheme for built-ins?
From: Andrew MacIntyre (andymac_at_bullseye.apana.org.au)
Date: 09/04/04
- Next message: QMartin_v=2E_L=F6wis=22?=: "Re: Uninstall speed with Python 2.4 MSI"
- Previous message: Gary Schenk: "Re: Xah Lee's Unixism"
- Maybe in reply to: Marco Aschwanden: "What about an EXPLICIT naming scheme for built-ins?"
- Next in thread: Alex Martelli: "Re: What about an EXPLICIT naming scheme for built-ins?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 4 Sep 2004 09:15:56 +1000 (EST) To: python-list@python.org
On Fri, 3 Sep 2004, Marco Aschwanden wrote:
> sort() works in-place.
> reverse() works in-place.
>
> The past tense of sort() indicates that a copy of the sequence is returned.
> The past tense of reverse() indicates that an iterator over the original
> sequence is returned.
This may be a language nuance, but neither "sort" nor "reverse" are past
tense - they are verbs, which imply an action. In this sense they are
totally appropriate as method names for inplace operations, as they
signify actions applied to the object.
"sorted" and "reversed" have past tense. As I recall, there was some
discussion on the python-dev mailing list on names for these methods for
the non-inplace versions of these operations; these were the outcome.
There is no chance before Python 3000 that sort() and reverse() will
change name - there is too much code to break.
-------------------------------------------------------------------------
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: andymac@bullseye.apana.org.au (pref) | Snail: PO Box 370
andymac@pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
- Next message: QMartin_v=2E_L=F6wis=22?=: "Re: Uninstall speed with Python 2.4 MSI"
- Previous message: Gary Schenk: "Re: Xah Lee's Unixism"
- Maybe in reply to: Marco Aschwanden: "What about an EXPLICIT naming scheme for built-ins?"
- Next in thread: Alex Martelli: "Re: What about an EXPLICIT naming scheme for built-ins?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|