Skip to main content

All Questions

2 votes
1 answer
118 views

Is it a good software engineering practice to store libraries as attributes of objects?

Suppose I initialize a library, say, in python object - #filename: file_A import file_ class A(): def __init__(self): self.pd = file_.pd self.np = file_.np And suppose the ...
Mr. Sigma.'s user avatar
2 votes
2 answers
4k views

Module with globals or Class with attributes?

Currently I'm working with a lot of modules where the original developers used global variables to control states and to exchange important information between functions, like so: STATE_VAR = 0 def ...
Andrei's user avatar
  • 131
-1 votes
1 answer
329 views

What is the programming paradigm when I just use functions in a file to organize my program?

I'm programming a telegram bot with Python and, for a number of reasons, there are no classes in the whole project, just several functions correlated to the the file where they are located. E.g., my ...
Teodoro Mendes's user avatar
0 votes
1 answer
399 views

Can I explain Classes and Objects without the full stack of OOP concepts?

I've been teaching Python to someone that was new to programming; and so far, so good. Now, I'm about to teach Classes and Objects. However, I still think it's too soon for the whole OOP concept, plus ...
OldCastle's user avatar