Look bottom line: a function that doesn't modify an object directy shouldn't be an instance method. Python has no class methods. That leavs procedures.
That's an implementation thing you're not supposed to mess with
I think .format is indeed the "proper" way to do it, and it's also a little more powerful/flexible/maintainable, but I usually use % anyway because it's quicker and easier. :P
Your task is to write an interpreter for the stack-based programming language/calculator dc. dc has a relatively small instruction set, and has a very terse syntax.However it must not be taken lightly, because it is an arbitrary-precision calculator.
For those of you who do not know what dc is,...
I think at this point you're just looking for reasons nt to like Python. That's fine: you can just say I don't like Python. I don't really give a shit, just don't then try to force yourself to use Python and get mad about it
@QPaysTaxes What if you comment out lines at the first character (like IDLE)? If we're following Python's rules of indentation, then this will cause all kinds of problems.
The plus sign + is used for addition and for string concatenation, but its companion: the minus sign, -, is generally not seen for trimming of strings or some other case other than subtraction. What could be the reason or limitations for that?
Consider the following example in JavaScript:
var...
@EasterlyIrk At work, I was tasked with rewriting some old VB that a bunch of professors wrote. It was the most poorly written code I have seen in my entire life.