ncorbuk / SubZone

SubZone - Subdomains, Dns records, & more! || Python tutorial || Certificate authority abuse || Adavnced || Hacking/Info-Sec ||
MIT License
43 stars 12 forks source link

Use spaces instead of tabs for indentation #5

Closed 42B closed 5 years ago

42B commented 5 years ago

https://pep8.org/#tabs-or-spaces

ncorbuk commented 5 years ago

Yep your so rite about this, and i knew this too :( i hate spaces so slow lol, but... will change it as mess's up code/pulls with other people adding code etc in future/future projects. Will fix soon.

42B commented 5 years ago

@ncorbuk

How are they slow? I use the tab key all the time... and it writes 4 spaces each time.

ncorbuk commented 5 years ago

yea you just said write tabs or spaces? i tab 4 spaces each time too? it is fast pressing the space bar is slow lol, tabbing is not the same as pressing space bar 4 times which is what you were saying i should use 4 spaces? tab is ---- and spaces is .... if you select over code that has both you'll see what i mean, and using tabs(which i have used in this and use) is bad and not pep8 and makes code that is written with spaces(....) not compatible eg. if anyone wants to pull in future and add code to project it becomes a mess

42B commented 5 years ago

i tab 4 spaces each time too?

Nope, you are putting a tab character each time,'\t'. I have no clue what kind of text editor you are using but, for example, PyCharm simply types 4 spaces every single time you hit the tab key. Sublime text, vs-code or whatever can all usually be set to write four spaces each time the tab key is hit.

ncorbuk commented 5 years ago

Oh i see, im using sublime text and each time i press tab i indents 4 spaces but its not a space... if i mix tabs and space's i get errors. Ill definitely look in too that, be real handy i can imagine.

42B commented 5 years ago

translate_tabs_to_spaces

ncorbuk commented 5 years ago

ah! thanks nice,

ncorbuk commented 5 years ago

changed the settings it did nothing, went in indentation menu and there is a setting convert indentation to tabs & convert indentation to spaces, clicked spaces... now i get spaces with tab! v nice ha, nice tip. 🥇

closing topic now.

42B commented 5 years ago

Just wait until you try PyCharm