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

175

u/IamImposter Nov 03 '21

While programming isn't as controversial

Well, let me show you.

A tab has to be 4 spaces. Any other choice is just plaine wrong.

gets popcorn and watches the world burn

110

u/sloggo Nov 03 '21

Plaine? plaine?!

40

u/IamImposter Nov 03 '21

Wait... That seems wrong.

Ah shit, I think I added extra 'e'

76

u/DrMaxwellEdison Nov 03 '21

Too late to refactor that now, there are legacy comments depending on it.

→ More replies (1)

15

u/CactusOnFire Nov 03 '21

Not doing a very good job at this "too stubborn to admit fault" bit.

I suppose that's a good thing, though.

31

u/[deleted] Nov 03 '21

Syntax error on line 3: "plaine" is not defined

58

u/IamImposter Nov 03 '21
#define plaine plain

28

u/[deleted] Nov 03 '21
→ More replies (1)

21

u/Competitive_Dog_6639 Nov 03 '21

I only use tabs with 16 spaces.

31

u/IamImposter Nov 03 '21

I'm pretty sure that is against Geneva Convention.

4

u/chrilves Nov 03 '21

Have you tried the whitespace language. I have the impression you might like it.

https://en.wikipedia.org/wiki/Whitespace_(programming_language)

→ More replies (2)

21

u/jpavlav Nov 03 '21

import plain as plaine

13

u/ccpetro Nov 03 '21

It's better than 3 or 5.

Those are just odd.

8

u/mildbait Nov 03 '21

Haha.. I actually changed from "isn't political" to "isn't as controversial" after the Silicon Valley episode popped in my mind.

7

u/Illustrious-Photo-48 Nov 03 '21

Per the Naval Correspondence Manual, the number of spaces for a tab depends on the font you're using. Gosh. /s

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.

→ More replies (1)

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?

→ More replies (1)

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!

→ More replies (1)

7

u/DeeDee_GigaDooDoo Nov 03 '21

A tab has to be 4 spaces. Any other choice is just plaine wrong.

clenches fist

5

u/Oerthling Nov 03 '21

This is the way

→ More replies (4)