#!/usr/bin/python2.6
# -*- coding: utf-8 -*-
def parameters(arg1,arg2,key1=1,key2=2,*arg,**keywords):
print "arg1",arg1
print "arg2",arg2
print "key1 %d"%key1
print "key2 %d"%key2
print "*arg",arg
print "**keywords",keywords
parameters(1,2,3,4,5,6,k1=1,k2=2,k3=3)
#arg1 1
#arg2 2
#key1 3
#key2 4
#*arg (5, 6)
#**keywords {'k3': 3, 'k2': 2, 'k1': 1}
#arg1普通参数(必填参数),key1默认参数(如不填就使用默认值),*arg非关键参数(可变参数接收的是一个tuple),**关键参数接收的是一个dict。