Added plant name in output message #7

Merged
khuxkm merged 4 commits from aphelion/cosmicbot:master into master 2021-06-23 16:53:48 +00:00
Contributor
No description provided.
aphelion added 1 commit 2021-06-18 01:20:50 +00:00
aphelion started working 2021-06-18 01:24:26 +00:00
aphelion canceled time tracking 2021-06-18 01:24:35 +00:00
aphelion added 1 commit 2021-06-18 01:43:11 +00:00
Owner

I feel like (ab)using a global variable is the wrong way to go about this. Maybe something using a return value and the walrus (:=) operator?

I feel like (ab)using a global variable is the wrong way to go about this. Maybe something using a return value and the walrus (`:=`) operator?
Author
Contributor

I can remove the global and return two values from the function in the form of a list or tuple.

I can remove the global and return two values from the function in the form of a list or tuple.
Owner

I feel like even that could be avoided with the use of some ingenuity.

>>> bool("nonempty string")
True
I feel like even that could be avoided with the use of some ingenuity. ```python >>> bool("nonempty string") True ```
aphelion added 1 commit 2021-06-23 14:55:17 +00:00
aphelion added 1 commit 2021-06-23 15:04:09 +00:00
Author
Contributor

Updated the code as per your suggestions. Removed the global variable and implemented the walrus operator := for ease.

Updated the code as per your suggestions. Removed the global variable and implemented the walrus operator `:=` for ease.
khuxkm merged commit 1cf36069c7 into master 2021-06-23 16:53:48 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: khuxkm/cosmicbot#7
No description provided.