V
V
Valery Semenov2012-04-27 16:59:47
Python
Valery Semenov, 2012-04-27 16:59:47

question about python way

switching to python from php. I repeatedly meet that several classes can be described in one file. In php this is considered bad practice. How does this work in python?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
kreativf, 2012-04-27
@Ravall

For python, this is normal. In python, historically, code is divided into modules rather than classes. Modules usually contain several classes, but they can also just contain functions.

I
istinspring, 2012-04-27
@istinspring

All transitioners should read PEP8 first ( www.python.org/dev/peps/pep-0008/ )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question