About 50 results
Open links in new tab
  1. When should I be using classes in Python? - Stack Overflow

    Oct 12, 2015 · In python the simple heuristic for when you should use a class comes down to whether or not your abstraction needs to be concerned with state. Abstractions that carry …

  2. python - What is the best way to structure a Tkinter application ...

    Jul 4, 2013 · On a more practical level, there is PEP8, the style guide for Python. With those in mind, I would say that your code style doesn't really fit, particularly the nested functions. Find a …

  3. class - Why should I use classes in python? - Stack Overflow

    Apr 15, 2016 · In Python, everything is an object, even int s. The whole language goes towards object-oriented programming, which is why you should prefer going for it, especially if your …

  4. python - Make a Tkinter Gui using classes - Stack Overflow

    Dec 17, 2020 · I want to create a GUI in a class that can create pages using another class that creates frames and widgets. The pages are set using a class for them. I want to be able to …

  5. performance - How much slower python classes are compared to …

    29 When I started learning Python, I created a few applications just using functions and procedural code. However, now I know classes and realized that the code can be much …

  6. python - What are data classes and how are they different from …

    What exactly are python data classes and when is it best to use them? code generators: generate boilerplate code; you can choose to implement special methods in a regular class or have a …

  7. Is there a benefit to defining a class inside another class in Python?

    Sep 17, 2008 · 35 I don't know Python, but your question seems very general. Ignore me if it's specific to Python. Class nesting is all about scope. If you think that one class will only make …

  8. python - Grouping tests in pytest: Classes vs plain functions

    Apr 25, 2018 · 141 I'm using pytest to test my app. pytest supports 2 approaches (that I'm aware of) of how to write tests: In classes: test_feature.py -> class TestFeature -> def …

  9. python - Using Classes in Pandas - Stack Overflow

    Aug 11, 2021 · 1 Im trying to write better more easy to read code and Ive begun starting to use classes.. Confusing thus far, but I can see the positives.. That said im simply trying to merge 2 …

  10. How do I run multiple Classes in a single test suite in Python using ...

    Mar 19, 2011 · In general there is no limitation on what you do in the code in test methods (testOne, testTwo, etc. in this example) when using the uniittest framework. so whatever …