r/Python • • Nov 03 '21

Discussion I'm sorry r/Python

Last weekend I made a controversial comment about the use of the global variable. At the time, I was a young foolish absent-minded child with 0 awareness of the ways of Programmers who knew of this power and the threats it posed for decades. Now, I say before you fellow beings that I'm a child no more. I've learnt the arts of Classes and read The Zen, but I'm here to ask for just something more. Please do accept my sincere apologies for I hope that even my backup program corrupts the day I resort to using 'global' ever again. Thank you.

1.3k Upvotes

201 comments sorted by

View all comments

Show parent comments

37

u/WldePutln Nov 03 '21

Vim is better than every other editor out there!!!

54

u/[deleted] Nov 03 '21

Yeah, better for casuals! I code using echo from the command line

$ echo line1 >> myCode.py
$ echo line2 >> myCode.py

15

u/PlusUltraBeyond Nov 03 '21

I do the same by WSL on Windows running on an emulator.

2

u/BridgeBum Nov 03 '21

On windows you could just use "copy con myCode.py"

5

u/master3243 Nov 03 '21

If you ever make a mistake just

$ echo "" > myCode.py

And redo the file without the mistake next time.

3

u/[deleted] Nov 03 '21

Yep, exactly. I mean, how else would you do it?

14

u/Heroe-D Nov 03 '21

True if you consider Emacs as a distribution and not an editor !

2

u/Galen_dp Nov 03 '21

It IS a distribution, not an editor.

4

u/DeeDee_GigaDooDoo Nov 03 '21

It's very intuitive!

1

u/chrilves Nov 03 '21

Actually, there's now a way to make vim and emacs users be friends again: "vscode is the best editor".