[Python-3000] A few small py3k wishes
Gareth McCaughan
gmccaughan at synaptics-uk.com
Tue Apr 4 16:31:25 CEST 2006
On Tuesday 2006-04-04 13:52, Michael P. Soulier wrote:
> On 04/04/06 Gareth McCaughan said:
...
> > That would confuse anyone used to Lisp, where after
> >
> > (defvar foo (list 1 2 3 4))
> > (puch 99 foo)
[of course I meant to type "push". Lisp's operator names
are obscure sometimes, but not that obscure]
> > the value of FOO is (99 1 2 3 4) rather than (1 2 3 4 99).
> > I take no stand on how much not confusing Lispers matters
> > to Python 3k.
>
> It would ease transition from Perl, and be consistent in the method naming.
I'd forgotten that Perl has a "push" with that behaviour. And,
come to think of it, Lisp has VECTOR-PUSH and VECTOR-PUSH-EXTEND
that add onto the end of a vector. Inconsistent naming: Bad Lisp!
Bad! No biscuit!
Anyway, Python surely has more perlites than lispniks among
its newcomers. So: the dubious antiprecedent of Lisp's PUSH
is outweighed by the precedent of Perl's and somewhat invalidated
by Lisp's internal inconsistency. I retract everything :-).
> If one is going to use a method obviously taken from the stack ADT, having a
> method normally called push() would be less confusing. I know that I found it
> so, having both used stacks and Perl.
>
> I can make a list subclass obviously, but I've always found append() and pop()
> one of those arrangements that just makes new Python programmers say, huh?
Oh, yes. The combination is ... peculiar.
--
g
More information about the Python-3000
mailing list