When.com Web Search

Search results

  1. Results From The WOW.Com Content Network
  2. Project structure for a reactor model built in Python

    codereview.stackexchange.com/questions/209022/project-structure-for-a-reactor...

    4. I use Python for various computational reactor modeling activities. While there are many components to the models I develop, the basic structure of the project folder tends to be similar to the following: The parameters.py file contains dictionaries with various model parameters for different components of the model.

  3. python - Making a directory structure for a web project - Code...

    codereview.stackexchange.com/.../making-a-directory-structure-for-a-web-project

    However, you're learning Python, and telling you to learn something else is not what you want. Python wise, I'd use with so that you automatically close the file, rather than leave the file open. You also want to drop all your semi-colons, they're not needed and it's recommended to not use them.

  4. Storing a version number in a Python project

    codereview.stackexchange.com/.../storing-a-version-number-in-a-python-project

    version = '.'.join(str(c) for c in version_info) This makes it possible to use version_info to compare against the numeric version like version_info > (1, 0) which has some nice benefits. Here's an example of the package in action: $ python3.4 -mvenv env. $ env/bin/python setup.py install. $ env/bin/my-script --help.

  5. python - How to structure tkinter with classes? - Code Review...

    codereview.stackexchange.com/questions/229503

    I am struggling to structure my current code into classes and defs. Here is my current code (below). It works perfectly fine, but I need to re-code it, re-structure it with classes, as I have been given a feedback from @BryanOakley to structure it with classes:

  6. python - DDD architecture pattern - Code Review Stack Exchange

    codereview.stackexchange.com/questions/283506/ddd-architecture-pattern

    Definitely depends on your usecase. The most important for you is to have valid domain objects, that is the bread and butter of your code, so I suggest putting them in their constructor. That way you ensure they are always valid (I mean we are in python, but you an assume). The cleaner approach is to pass repositories.

  7. Fantasy Game Inventory - Automate the Boring Stuff with Python

    codereview.stackexchange.com/questions/230248

    You are creating a fantasy video game. The data structure to model the player’s inventory will be a dictionary where the keys are string values describing the item in the inventory and the value is an integer value detailing how many of that item the player has.

  8. python - Coffee Machine practice project - Code Review Stack...

    codereview.stackexchange.com/questions/285277/coffee-machine-practice-project

    Coffee machine project using Python OOP. 3. Slot-machine balance counter. 4. Slot Machine Project.

  9. Parse YAML file with nested parameters as a Python class object

    codereview.stackexchange.com/questions/192252/parse-yaml-file-with-nested...

    To allow easier access to the nested parameters, I use an intermediate Python class to parse the dictionary values into class attributes. The class attributers are then used to obtain the values associated with the parameters. Below is an example of how I envision using the approach for a much larger project: params.py.

  10. python - Fantasy game inventory — Ch. 5 Automate the Boring Stuff...

    codereview.stackexchange.com/questions/222354/fantasy-game-inventory-ch-5...

    8. Here is a practice exercise — Fantasy Game Inventory − −. You are creating a fantasy video game. The data structure to model the player’s inventory will be a dictionary where the keys are string values describing the item in the inventory and the value is an integer value detailing how many of that item the player has.

  11. python - Simple hotel reservation system - Code Review Stack...

    codereview.stackexchange.com/questions/101589/simple-hotel-reservation-system

    Rooms for example are probably better stored as some data structure that specifically represents a room. Same goes for guests. Refactoring. There's a lot of code here that could be logically grouped together. For example there's a bunch of functions that have the following structure: def some_function(line:str): global bedroom_list #more code