I'm back

I'm probably unknown anyway, (check out my post count hahaha), but the reason I left the forums for a bit, was that I was doing python at school. Because of my nooby programming skills, I could not handle 2 languages, and c++ fell to the side...until now!

So I'm back, and I'm also taking an instructed course right now to help me along, and I'll probably post some help from that class here.

Thanks!
closed account (Dy7SLyTq)
this may seem like a stalker question (ill explain why i want to know it if you answer) but where do you place your {}'s
@DTS is this because you believe python programmer's place their brackets in specific places?
If so, I started with python for four years and this is how I do it:
1
2
3
int main() {
	return(0);
}


@OP Don't know you, but welcome back. I hope you are a benefit to our community.
I hate you Script coder. D; Never put brackets in those places.

Anyway welcome back Zincott (Never saw you though.. O_o) I hope you have a nice time back here at these wonderful forums.
I don't know a great deal about python, but are there even brackets in python? I thought it just used indentation...
No, there aren't brackets that I know of.
Nope no brackets, but the indentation scheme could cause programmers to use brackets in other languages differently.

I hate you Script coder. D; Never put brackets in those places.

Lol, a very simple solution: don't read my code.
@Script Coder
Nothing wrong with your code.

I laugh that so many people complain about the placing of the brackets. If you look at Bjarne's book and the "C++ in-depth" series he supervised, the code in all of it is:
1
2
3
4
5
6
7
8
9
int main(){
      while(){
            if(){
            }
            else{
            }
      }
      return 0;
}
closed account (1yR4jE8b)
Linux Kernel Style Guide: https://www.kernel.org/doc/Documentation/CodingStyle
Python does have brackets. And parentheses and braces. It doesn't use braces for scoping because it uses FORCED INDENTATION OF CODE instead. It uses braces to declare dict objects.
@chrisname ah, yes. I was only thinking of code indentation.
@BHXSpecter and darkestfright thank you for helping me prove to fredbill that the way I use brackets is perfectly fine :P
closed account (Dy7SLyTq)
@scriptcoder: no its beacuse i use
function, if, while, etc
{
}
also python doesnt use {} except for array and array style objects
@DTS Ah, then it was a really random connection:
"Hi I'm back"
"Do you code like this or this"
lol :)

how many of you guys follow the linux kernel system?
Well the creator has horrible coding styles IMO.
I used to follow the Linux coding style but I don't any more. When I came across it, I was using 4-space indents instead of 8-space tab indents, but otherwise identical to the Linux style. Then I switched to using tab for indent and spaces for formatting. A while ago I switched back to just spaces because spaces are better for formatting, are more portable (space indents look the same on all text editors whereas tab often looks different due to different settings), and also because 8-space tabs indent way too much when you use 80 chars per line (which I do, and which the Linux kernel coding style suggests).
Topic archived. No new replies allowed.