Skip to content

recreate feature review branch#1

Open
penny-wanjiru wants to merge 60 commits intomasterfrom
feature-review
Open

recreate feature review branch#1
penny-wanjiru wants to merge 60 commits intomasterfrom
feature-review

Conversation

@penny-wanjiru
Copy link
Owner

No description provided.

main/mains.py Outdated
'Hogwarts', 'Mordor', 'Orange', 'Turquoise',
'Peach', 'Cyan']

for i in range(0, len(office_names)):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality: Nitpick

This could have been written as.

for office in office_name:
    self.offices.append(Office(office))

Much shorter, less confusing, no need for the indexes.

'Hogwarts', 'Mordor', 'Orange', 'Turquoise',
'Peach', 'Cyan']

for office in range(0, len(office_names)):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Quality: Nitpick

We could also write this as:

for office_name in office_names:
    self.offices.append(Office(office_name))

Without the range operation. It is much easier to read IMO and gets rid of the indexes.

The same thing was done below.

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