"Michael P. Soulier" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>It's a minor thing, but it'd be nice to make a method alias for append() 
>on
>mutable sequences called push(), to go with pop().

Bound methods to your rescue:

_stack = []
push = _stack.append
pop  = _stack.pop

Now push(i) and  i = pop() to your heart's content ;-)

What's ironic about your 'wish' is that making it possible to make a bound 
pop to go with the previously possible bound push was part of my rationale, 
several years ago, for proposing the addition of a pop method.

Terry Jan Reedy



_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to