1

Topic: List vs. Tuple

Let's present a pop-up banner with three goods. Or, for example, a patience with output on 3 cards. The object needs to be allocated correctly in the given area and to draw. What it is better to transfer outside in f-tsiju ? - The list and to write the code for offset of objects under any formula? Or - , and simply explicitly to specify positions? And why? Task change is possible further. On +1 or +2 elements. Simply it seems to me that with lists a lot of code which not especially and is necessary on small amounts of elements turns out. Especially in languages without unpacking of lists.

2

Re: List vs. Tuple

Hello, neFormal, you wrote: F> - the list and to write the code for offset of objects under any formula? If at all does not look expedient the formula to write - to thrust , but all the same to get from the list. And it is better than coordinate in other list, then though and , but supported.  for heterogeneous collections when to each index there can be something the.

3

Re: List vs. Tuple

Hello, Alexander G, you wrote: F>> - the list and to write the code for offset of objects under any formula? AG> if at all does not look expedient the formula to write - to thrust , but all the same to get from the list. AG> and it is better than coordinate in other list, then though and , but supported. It anyway will be supported. I do not understand simply, what for visually to complicate the code. The same becomes, as a matter of fact. AG> Tupl for heterogeneous collections when to each index there can be something the. Extremely disputably. I here used the term in sense of item collection with fixed positions. For example, instead of  there can be positional arguments f-tsii.

4

Re: List vs. Tuple

And it is possible to show the code as it is made now? That it was better clearly...

5

Re: List vs. Tuple

Hello, MozgC, you wrote: MC> And it is possible to show the code as it is made now? That it was better clearly... Half-day thought, what such to show the difficult was not invented anything enough. A question rather philosophical. At me it is simple in the code enough  . And it is abstract something of type such: def process (xs): assert (len (xs) == 3) for x in xs: x [1] + = 1 return xs xs = [[1,2], [3,4], [5,6]] process (xs) I not so like presence  (nuances of logic. Should be if with other returned value) and I think that if the behavior is sharpened on a small fixed amount of elements it should be put in the contract. Initially I was set by it when drew the network protocol in protobuf'. But situations generally identical, except for an overhead charge for an exchange and handling for the client and a server.

6

Re: List vs. Tuple

Hello, neFormal, you wrote: F> That it is better to transfer outside in f-tsiju ? F> - the list and to write the code for offset of objects under any formula? F> or F> - , and simply explicitly to specify positions? The list. F> and why? Because responsibility sharing. The one who gives objects to the draughtsman, should not know anything about their geometry .

7

Re: List vs. Tuple

Hello, Ops, you wrote: F>> And why? Ops> Because responsibility sharing. The one who gives objects to the draughtsman, should not know anything about their geometry . He also does not know. It simply more strict contract.