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]:
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
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
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
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]
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.