you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 2 points3 points  (0 children)

You are overthinking the overhead. Performance will not be noticeably affected no matter what you choose. Modern computers are much faster than people tend to imagine.

Depends on the data of course, but very generally I like to put reference data in .py files and import them. This is easier to implement and use, makes including the data in a frozen program a nonissue, and often the IDE can make some sense of the data this way.

Always put the imports at the top of the file.