| To: | REALbasic Betas <realbasic-betas at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: Ability to have more than one Lvalue |
| From: | David Shaw <osx at mac dot com> |
| Date: | Sun, 28 Jul 2002 14:15:57 -0400 |
>> There is also a feature request (that I think we should *not* make for
>> RB) that would have functions able to return more than one value. So you
>> could do something like:
>>
>> (a, b) = foo(3)
>>
>> where foo returns two values.
Python offers this, and it's a great feature. Python uses a immutable data
type called a tuple to group objects in the return. This allows for stuff
like this:
> myString = "a,b,c,d"
> splitstring = string.split(myString, ",")
> print splitstring
('a', 'b', 'c', 'd')
> print(splitstring[2])
'c'
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | 4.5 quitting on activate from background: solved (almost), Roland Voegtli |
|---|---|
| Next by Date: | Re: Vector3D ops on nil objects, Joseph J. Strout |
| Previous by Thread: | Re: Ability to have more than one LValue, Will Leshner |
| Next by Thread: | Re: Ability to have more than one Lvalue, Guyren G Howe |
| Indexes: | [Date] [Thread] [Top] [All Lists] |