Re: What about an EXPLICIT naming scheme for built-ins?
From: David Fraser (davidf_at_sjsoft.com)
Date: 09/03/04
- Next message: Paul Repacholi: "Re: Xah Lee's Unixism"
- Previous message: Carlos Ribeiro: "Re: Announcing PyCs, a new Python-like language on .Net"
- In reply to: Marco Aschwanden: "What about an EXPLICIT naming scheme for built-ins?"
- Next in thread: Paul McGuire: "Re: What about an EXPLICIT naming scheme for built-ins?"
- Reply: Paul McGuire: "Re: What about an EXPLICIT naming scheme for built-ins?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 03 Sep 2004 21:52:40 +0200
Marco Aschwanden wrote:
> I just read the changes for 2.4 and while scanning the list the past
> tense built-ins got my attention:
>
> sorted() - a new builtin sorted() acts like an in-place list.sort() but
> can be used in expressions, as it returns a copy of the sequence, sorted.
>
> reversed() - a new builtin that takes a sequence and returns an iterator
> that loops over the elements of the sequence in reverse order (PEP 322)
>
>
> sort() works in-place.
> reverse() works in-place.
>
How about reversed() returning a sequence, like sorted does, but adding
an iterator function called riter or reverseiter to iterate over
sequences in reverse order. That would then be similar to the iter
builtin. You could have a sortediter as well
David
- Next message: Paul Repacholi: "Re: Xah Lee's Unixism"
- Previous message: Carlos Ribeiro: "Re: Announcing PyCs, a new Python-like language on .Net"
- In reply to: Marco Aschwanden: "What about an EXPLICIT naming scheme for built-ins?"
- Next in thread: Paul McGuire: "Re: What about an EXPLICIT naming scheme for built-ins?"
- Reply: Paul McGuire: "Re: What about an EXPLICIT naming scheme for built-ins?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|