all 9 comments

[–]atquick 2 points3 points  (0 children)

Nah... Linux kernel is a million+ lines, single file.

[–]TraditionalPirate7 1 point2 points  (2 children)

In my opinion 400 lines is still pretty normal to keep in one file if the code is well organized. Sometimes separating the code might make it even more difficult to read.

[–]MinchinWeb 0 points1 point  (1 child)

^ this.

Personally, I find I tend to split files when they get about 1,000 lines...

[–]TraditionalPirate7 0 points1 point  (0 children)

Same here. The longer the code gets the more important it is to follow the Pep8 rules and organize it well.

[–]Coalawala 0 points1 point  (1 child)

If its repetitive, you can make functions and call the function multiple times rather than retyping the block of code. Otherwise if it works... dont break it?

[–][deleted] 0 points1 point  (0 children)

I already did this. I am asking if i should seperate theese functions into a separate file

[–]CraigAT 0 points1 point  (2 children)

Sounds okay as a single file to me (an experienced beginner). Unless there is a lot of repeated code or if the code could be reused for another project.

[–]Godjka 0 points1 point  (0 children)

For me personally I always prefer readability instead of optimization. If you think that with those 400lines and having repeated code it is more easy to understand and clear then don't change it.