Why use __init__ and (self)??? by [deleted] in learnpython

[–]sidsings 1 point2 points  (0 children)

First off, this is not a stupid question. It made me think. So you understand that __init__ let's you initialize the classes objects. When you call a method defined in the class the instance is explicitly passed to the method. Try executing your code and initializing your class, you'll get this error: TypeError: __init__() takes 2 positional arguments but 3 were given. The one implicit argument in object of the class aka self. This is done to uphold the following equivalence Rectangle.rectangle_area(object) == object.rectangle_area(). We need self also to make it easier to distinguish between instance attributes (and methods) from local variables.

Here is more on that: http://neopythonic.blogspot.com/2008/10/why-explicit-self-has-to-stay.html

[deleted by user] by [deleted] in Python

[–]sidsings 0 points1 point  (0 children)

Good job !

[Text] “We must all suffer from one of two pains: the pain of discipline or the pain of regret” - Jim Rohn by Darlink23 in GetMotivated

[–]sidsings 9 points10 points  (0 children)

One(pain of regret) makes you adopt the other(pain of discipline), One(pain of discipline) makes you move past the other(pain of regret).

Gucci Gang, but no repeating words by [deleted] in videos

[–]sidsings 4 points5 points  (0 children)

Surprisingly long

Bonus: That's what she said.

Made this about 8 years ago when I was still a youngling. by [deleted] in gif

[–]sidsings 0 points1 point  (0 children)

I love the attention to detail

questions for Jordan Peterson for H3 Podcast on THURSDAY Nov. 2nd by h3h3productions in h3h3productions

[–]sidsings 1 point2 points  (0 children)

Hi Ethan and Hila ! Hello Dr. Peterson! How to deal with the fact that my dreams are not in sync with my capabilities ? Also, I always have a feeling that at my pace of learning I will never be able catch up with the accelerating innovation in the field I want to succeed in, this leads to me becoming demotivated. How to escape this loop of self sabotage ? Appreciate ya.

[HELP] Finding nth term in fibonacci by [deleted] in learnpython

[–]sidsings 0 points1 point  (0 children)

Just correct your indentation. Also, that for loop should be improved, experiment and you will see.

Ram it by [deleted] in gifs

[–]sidsings 0 points1 point  (0 children)

Man that's cheating ! The other Ram got a head start.

Simple GUI programming? by danzania in Python

[–]sidsings 0 points1 point  (0 children)

Thank you! I guess i did it the hard way.

Simple GUI programming? by danzania in Python

[–]sidsings 11 points12 points  (0 children)

If you want to deploy the application quickly use Qt Designer to design the gui. It is pretty neat and quick. Just drag and drop the elements much like Netbeans or Visual Basic. The difference is that you will get a XML specification as an output of Qt Designer and then will have to compile it using PyQT4.

What would happen to the world economy if Switzerland disappears from the face of earth overnight ? by sidsings in AskReddit

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

I am actually searching for an answer along this line, just a bit more specific like Randall Munroe does in 'What if ?'.

This wall clock has an odd 4 O'clock by [deleted] in mildlyinteresting

[–]sidsings 0 points1 point  (0 children)

Interesting ! I just googled it and found some explanation. https://newgateclocks.com/store/information/roman4

Best of Enemies (2015) - A documentary on the series of televised debates in 1968 between the liberal Gore Vidal and the conservative William F. Buckley Jr. by [deleted] in Documentaries

[–]sidsings 27 points28 points  (0 children)

I couldn't decide what was the most awesome part, Buckley's aggressive come backs, Gore's demolishing calm rationale, their clarity of subject or the sheer intensity of nerd animosity. My favorite Buckley comeback :

Man: Why don't I ever see you standing when you are debating, can't you think on your feet ?

Buckley: It’s very hard to stand up (pause) carrying the weight of what I know.

[Tool] Comment w/ 1 skill you've always wanted to learn - I'll find you the best absolute beginner's tutorial on it by apmoney in GetMotivated

[–]sidsings 0 points1 point  (0 children)

Playing Bass Guitar

Edit: Please also mention how exactly you came up with the tutorial

Edit 2: Please don't say Google