-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impovements from PRs #245
Merged
Merged
Impovements from PRs #245
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modern Python classes implicitly inherit from object.
- Changed order of imports to match PEP8. - Adjusted __repr__ so that brackets are given with the distribution name. - Added a mixture distribution class.
String representations needed to be updated.
Docstrings and type hints for schedules.Schedule
Just found Salabim. Definitely looks like another simulation tool that can handle queues.
In Python, the is not None construct is preferred over != None for several reasons: Identity Comparison vs. Value Comparison: is not is an identity comparison, which checks whether two objects refer to the same memory location. != is a value comparison, which checks whether the values of the objects are equal. None is a Singleton: None is a singleton object in Python, meaning there is only one instance of None in the entire program. Using is not None leverages the identity comparison and takes advantage of the fact that there is only one None object, making it more efficient than a value comparison. Consistency: Using is not None is more consistent with the recommended practice of using is and is not for checking against singletons (like None). Avoids Unintended Behavior: Value comparisons (!=) may behave unexpectedly when dealing with objects that override the __eq__ method, leading to potential pitfalls. Identity comparisons (is not) are safer in such cases, as they explicitly check for object identity.
Everything inherits from `type`. https://realpython.com/inheritance-composition-python/
Node does need to explicitly inherit from object.
I saw this message on the continuous integration build errors. It looks like we just need to update the version. `The sphinxcontrib.applehelp extension used by this project needs at least Sphinx v5.0; it therefore cannot be built with this version.`
Update Sphinx version.
Remove inheriting from `object` state_tracker.py
Update other.rst
Docstrings and type hints for schedules.Schedule
NumPy docstrings and type hints in disciplines.py
Mixtures and __repr__ enhancements.
…ture distribution
Change `!= None` to `is not` in import_params.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.