Tag Info

New answers tagged

-1

It is definitely okay and I would encourage you to have several classes in one file as long as they are realated. In general your classes should stay short and concise and you should rather split up behaviour in two or more classes than build huge monolithic ones. When writing several small classes it is really necessary and helpful to keep those that are ...


-3

In short - hell yes. Moreover, having multiple classes in a single file is sometimes very handy. Some packages (six, bottle) explicitly ship in a single file in order to easily be integrated into any third-party module without being pip installed (sometimes desirable). But, do make sure to organise your code well. Intensively use code comments and ...



Top 50 recent answers are included