Skip to main content

All Questions

13 votes
3 answers
27k views

Is it a better practice pre-initialize attributes in a class, or to add them along the way?

I'm sorry if this is a ABSOLUTELY sophomoric question, but I'm curious what the best practices are out there, and I can't seem to find a good answer on Google. In Python, I usually use an empty class ...
Gilead's user avatar
  • 233
1 vote
3 answers
246 views

What is a good method/practice I can employ to keep identical code snippits in two places in sync? Also, help documenting functionals

If I could get some input on the design of this, I would be grateful as well. Note that I'm programming in python. There's a function F that takes lots of data, runs some analysis on it (taking ...
chausies's user avatar
  • 165