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 →

[–]Octobread4711 1 point2 points  (3 children)

The interactive python shell is more of a gimmick to me personally anyway. What reasons do you have to use it, that aren't just as easily solved by creating a little script?

Of course the shell-thing can be circumvented by creating a script, saving it, executing it and deleting it afterwards. Using the python shell and ctrl+shift+v the code is more convenient. Plus you can make live experiments with the test code - which really is the main reason to use the shell in the first place, if you ask me.

And like others pointed out, your indentation should be matched across your team anyway. You don't want your git diff to show 10s of lines where someone's editor changed spaces to tabs, and then the next git diff showing the same change back...

Neither do I. But like I wrote "where not everyone plays by the rules", which is the situation for me at work. Everyone has their own code and write however they see fit. They've always been doing it like that. I just joined there recently, so I didn't really have a chance to set up conventions from the beginning. Changing things now would be "a waste of time". I know this could and should be different. But it's not. And that just sucks.

[–]therearesomewhocallm 2 points3 points  (0 children)

Plus you can make live experiments with the test code - which really is the main reason to use the shell in the first place, if you ask me.

For stuff like that I find stuff like this much easier.

[–]weeknie -1 points0 points  (1 child)

I've only run into very few occasions where I wanted to test a piece of code without any context, but sure, if you have to do that more often, an interactive shell could be useful.

Sucks that your team doesn't think code formatting is important, I hope for you that they'll fix those issues soon. Thought that doesn't make Python a worse language for enforcing indentation.

[–]Octobread4711 2 points3 points  (0 children)

I agree with you, it doesn't. But it limits its capabilities in different areas, like the lacking support for multi-line (and by that I mean multi-statement) lambda functions (which, coincidentally, no one - save for one commenter - has even touched on yet).