PDD 03 Issue: keyword arguments

2004-11-30 Thread Sam Ruby
Python provides the ability for any function to be called with either positional or keyword [1] arguments. Here is a particularly brutal example: args={'a':1,'b':2,'c':3} def f(a,b,c): return (a,b,c) def g(b,c,a): return (a,b,c) for j in [f,g]: print j(1,2,3) for j in [f,g]:

Keyword arguments

2002-11-06 Thread Piers Cawley
So, I was, thinking about the way Common Lisp handles keyword arguments. It's possible to declare a Lisp function as follows: (defun make-para ( content key alignment font size color ) ...) The point here is that the first argument is dealt with positionally, and subsequent, optional args

Re: Keyword arguments

2002-11-06 Thread Austin Hastings
hashkeys. =Austin --- Piers Cawley [EMAIL PROTECTED] wrote: So, I was, thinking about the way Common Lisp handles keyword arguments. It's possible to declare a Lisp function as follows: (defun make-para ( content key alignment font size color ) ...) The point here is that the first

Re: Keyword arguments

2002-11-06 Thread Luke Palmer
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm From: Piers Cawley [EMAIL PROTECTED] Date: Wed, 06 Nov 2002 12:44:39 + X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ So, I was, thinking about the way Common Lisp handles keyword arguments. It's possible to declare

Re: Keyword arguments

2002-11-06 Thread Paul Johnson
Austin Hastings said: sub callmysub { mysub(Testing .. 1, 2, 3!; key = 1024, align = Module::RIGHT); } Which, upon reflection, apparently introduces an implicit hashparsing context for autoquoting hashkeys. Those are pairs, aren't they? -- Paul Johnson - [EMAIL PROTECTED]

Re: Keyword arguments

2002-11-06 Thread Piers Cawley
Paul Johnson [EMAIL PROTECTED] writes: Austin Hastings said: sub callmysub { mysub(Testing .. 1, 2, 3!; key = 1024, align = Module::RIGHT); } Which, upon reflection, apparently introduces an implicit hashparsing context for autoquoting hashkeys. Those are pairs, aren't they? Yup.