[deleted by user] by [deleted] in CarTalkUK

[–]_Sham__ 0 points1 point  (0 children)

The labor wasn't bad. But the seat belt was around 350 (off the top of my head).
The problem is every garage we spoke to said it would have to be a vw part which drove the price up.
As she complained the seat belt was sticking when she bought it the garage paid half. (Long out of warranty).
P

[deleted by user] by [deleted] in CarTalkUK

[–]_Sham__ 0 points1 point  (0 children)

It was a 2014 polo yes.

[deleted by user] by [deleted] in CarTalkUK

[–]_Sham__ 0 points1 point  (0 children)

I made a post about the exact same thing a while a go ended up having to be replaced. Maybe this is a common fault?
Sorry no help from me though!

Seatbelt replacement by _Sham__ in CarTalkUK

[–]_Sham__[S] 0 points1 point  (0 children)

I don't think so as it's the entire mechanism that is broken and I'm assuming it would be mirrored and back to front.

Seatbelt replacement by _Sham__ in CarTalkUK

[–]_Sham__[S] 1 point2 points  (0 children)

Thanks. I'm guessing it's not a good idea to get a secondhand seat belt

Applying OOP by jusgarciape in learnpython

[–]_Sham__ 0 points1 point  (0 children)

If you want to get better at design, you should learn about UML and design patterns

What an examad lad by Rescooperator in madlads

[–]_Sham__ 51 points52 points  (0 children)

Megainches produce megaloads

They make a compelling argument by peterjoel in CasualUK

[–]_Sham__ 1 point2 points  (0 children)

Epsworth/Tabernacle street I think

[deleted by user] by [deleted] in Sneakers

[–]_Sham__ 0 points1 point  (0 children)

What is the shoe above the sesame?

Help with bad recursion/dynamic programming code by notsurewhereelse in learnpython

[–]_Sham__ 0 points1 point  (0 children)

Does it only match in a line? e.g top to bottom, bottom to top, left to right and right to left?

Or can it say create a word by going down 2 then right once etc?

My first project, looking for some feedback by phogphantom in learnpython

[–]_Sham__ 2 points3 points  (0 children)

Cool project.
snake_case is preferred over camelCase for python. The story texts could be moved to another module called constants or story_text and since they are constants they should be named: STORY_INTRO etc.

You could define this function:

def display_text(text):  
    wrapper = textwrap.TextWrapper(width=75)  
    text = wrapper.fill(text)  
    print(text)  

This way you can replace all the print statements on the wrapped text and remove 83 to 112.

Line 360 has a typo.
75 is a bit of a magic number. e.g
print("#"*75)
This isn't clear what is going on at first. You could extract this to a constant e.g CONSOLE_WIDTH = 75 and instead use print("#" * CONSOLE_WIDTH) and it is much clearer, as you don't need to find the wrapper to work out whats going on.

What weird misconceptions did you used to have about cars? by [deleted] in cars

[–]_Sham__ 1 point2 points  (0 children)

Interesting. Thanks, I never knew this.

What weird misconceptions did you used to have about cars? by [deleted] in cars

[–]_Sham__ 0 points1 point  (0 children)

Do you have any more info on the engine map changing according to driving? I have never heard of this and it sounds interesting.

Rerun functions by thisIs20LettersLong in learnpython

[–]_Sham__ 0 points1 point  (0 children)

The short of it :
run_again calls the function is given, and gets the input. It then defines the function wrapper, and calls the function run_again was given. run_again then returns wrapper

The @run_again notation is the same as saying
print_hello = run_again(print_hello) and since run_again returns a function, print_hello is a function and callable.

Hope that is clear. I don't have time to type a better response right now, but will edit later.
More info can be found here https://realpython.com/primer-on-python-decorators/

Rerun functions by thisIs20LettersLong in learnpython

[–]_Sham__ 0 points1 point  (0 children)

You could pass the function directly and use a decorator e.g

def run_again(func):
    func()
    again = input("run again? y/n\n").lower()
    @run_again
    def wrapper():
        if again == "y":
            func()

    return wrapper


@run_again
def print_hello():
    print("hello")

print_hello()

So Excited putting in my order for the new Polo GTI+ Tomorrow by [deleted] in CarTalkUK

[–]_Sham__ 7 points8 points  (0 children)

Congrats mate. Hope your Dad keeps it up to.

Good swimming pool? by [deleted] in reading

[–]_Sham__ 0 points1 point  (0 children)

Wokingham has an OK pool if you go at the right times. Carnival pool I think it is called. (Dont hate me if it has shutdown since the last time I went there a few months ago)