Python 2.3 problem
gherron at islandtraining.com
Mon Aug 25 17:08:03 CEST 2003
On Sunday 24 August 2003 01:00 pm, Nomen Nescio wrote:
> When I does this like hear failre goes:
> def pinhtranh(*args, laoc_te):
> phnoi_crek(args, laoc_te)
> I do "laoc_te" last praemetr name always.
The syntax of Python does not allow this, but perhaps the following
will do what you want. The two lines in pinhtranh will set "laoc_te"
to the last argument, and "args" to a tuple of all except for the last
args = allArgs[:-1]
laoc_te = allArgs[-1]
I hope that's what you wanted.
More information about the Python-list