roastpotatothief

joined 4 years ago
MODERATOR OF
 

The only differences are that tuples are immutable and that lists have extra methods.

Is there ever a strong need for list-type data to be immutable? Evough to justify a whole extra data-type in the language?

Should they release a python 4 with it removed?

The only thing I can think of is as a default function parameter. This function is okay:

def dothings(a=(1,2)):
    print(a)
    a = (a[0], 3)

But this function misbehaves the second time it is called:

def dothings(a=[1,2]):
    print(a)
    a[1] = 3

But IMO the "mutable arguments" thing is another bug to be fixed in a hypothetical python 4. And even in python 3 you just write the function the recommended way, so there is not such a big problem.

def dothings(a=None):
    if a is None:
        a = [1, 2]
    print(a)
    a[1] = 3

The Python devs are clever guys though. There must be some really important reason to maintain both types?

 

It seems obvious. If i spend 600€ on a new bike and 600€ on a conversion kit, i will get a very high spec e-bike. But i would have to spend double that, about 3000€ to get an okay quality off-the-shelf e-bike.

The off-the-shelf e-bike won't be the exact size/style i like. They are nearly all city-bike style. Not many sizes are available, usually just small, medium, large (whatever that men's).

It will be much heavier.

It will be more difficult to customise, for example with baby seat, lights, horns, mirrors.

It will probably be impossible to de-restrict, to be usable at normal cycling speeds.

Most importantly, it will not use standard parts. For example if the battery or motor dies after a few years, i have to buy a replacement from the same manufacturer, if that is even available. For a converted bike, i can change the components independently and choose any brand for the new parts (i think).

What is the argument for buying an off-the-shelf e-bike? Why would anyone do that?

 

We all have to fail at the task. Make the results useless for their training. It's the only way to make them stop giving us this unpaid work to do.

view more: ‹ prev next ›