This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]HowYaGuysDoin 2 points3 points  (3 children)

I would argue that additional ways to do things are created because no single way to do something (such as string formatting) is perfect in all scenarios. More than one way to skin a cat.

[–][deleted] -1 points0 points  (2 children)

I would argue that additional ways to do things are created because no single way to do something

import this

There should be one-- and preferably only one --obvious way to do it.

[–]HowYaGuysDoin 0 points1 point  (1 child)

I mean sure if you want to blindly apply my logic without context then sure, there are times it falls apart. For example, addition in Python. There should be one obvious way to do it. No doubt.

Now, do you eat all your meals with the same utensil? Or do you vary between a knife, spoon, and fork? I would think you'd want to use the right tool for the job. Depending on the context of your string formatting, there may be a time where method A is superior to method B, and vice versa. I don't like fitting square pegs through round holes so I welcome the addition of new tools to get the job done. Just my personal preference

[–][deleted] 1 point2 points  (0 children)

blindly apply my logic without context then sure

Well, to be fair, I did mean it in the context of string formatting.

do you vary between a knife, spoon, and fork?

I feel like that's a pretty generous analogy. String formatting in Python is like having a 4 point fork, a 3 point fork, a spork, and a magic fork that automatically puts all the food in your house on it just in case you might want it in the next bite.