About 19,200 results
Open links in new tab
  1. python - Model cars as classes - Code Review Stack Exchange

    I am learning about object oriented programming in Python using classes. I have attached an image of what I had in mind when structuring my classes. This is supposed script model cars. I …

  2. python - Character creator for a role-playing game - Code Review …

    Jan 26, 2012 · One of the first things I would do is try and group your information into neater packages, rather than having a bunch of free variables. I assume you're not too familiar with …

  3. python - Trying Out DDD : How to enforce data integrity and ...

    Feb 4, 2025 · I've been transitioning from type-safe programming languages like Dart and Java to Python, and I'm trying to enforce Domain-Driven Design (DDD) principles in a language that …

  4. python - Set Class Implementation ADT - Code Review Stack …

    Jun 29, 2018 · Python already has built-in abstract base classes for sets and mutable sets — see the collections.abc module. There's even a recipe in the documentation for implementing an …

  5. Coffee machine in OOP Python 3 - Code Review Stack Exchange

    May 7, 2020 · CoffeeMachine and Coffee model classes. PurchaseCoffee control class that implements the purchasing of a coffee. For simplicity, since we envision currently the only type …

  6. python - Structure of inheritance between Animal classes and …

    Oct 31, 2016 · Dog and Cat classes should be instances from the Animal class, which can inherit every attributes in Animal. So first, I defined all the attributes in the Animal class. Note that the …

  7. Python Rock-Paper-Scissors via a class to handle the game

    Nov 1, 2019 · Original inspiration was by this Python beginner, and it prompted me to rewrite a bunch of stuff with my flair and my Python experience: First attempt: Python Rock Paper …

  8. OOP bank account program in Python 3 - Code Review Stack …

    Mar 7, 2019 · One class/file is not pythonic; you end up with classes like bank_account.BankAccount, which you then work-around using from bank_account import …

  9. python - OOP in Rock, Paper, Scissors program - Code Review …

    Aug 8, 2012 · This is an OOP Rock, Paper, Scissors program I wrote in Python. I am just learning about using classes and I'd appreciate some advice on improving it. # rock.py # example of …

  10. Python OOP shopping cart - Code Review Stack Exchange

    Jul 15, 2017 · It seems like you come from a Java/getter-setter background. Python can do that, but don't. Python is happy that it has no privates. For simple public data attributes, it is best to …

Refresh