Skip to content

Refactoring Offer Class using Python Built-In Methods#116

Open
EvilCheetah wants to merge 14 commits intomdesilva:masterfrom
EvilCheetah:master
Open

Refactoring Offer Class using Python Built-In Methods#116
EvilCheetah wants to merge 14 commits intomdesilva:masterfrom
EvilCheetah:master

Conversation

@EvilCheetah
Copy link
Copy Markdown

Utilized:

  • The built-in date-time functionality, especially in string formatting using strftime method
  • The benefits of the __str__ magic method. The use of __str__ over toString not only improves code readability but also conforms to the conventions of Python
  • f-strings were used to enhance readability
  • Constants to provide semantic meaning to the numerical values

Sources:
F-string Format: Python Docs - str.format
DateTime Formatting: Python Docs - DateTime - date.strftime
DateTime CheatSheet: DevHints - DateTime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants