Skip to content

Ocelots - Cindy Truong#9

Open
ciindii wants to merge 13 commits intoada-ac2:mainfrom
ciindii:main
Open

Ocelots - Cindy Truong#9
ciindii wants to merge 13 commits intoada-ac2:mainfrom
ciindii:main

Conversation

@ciindii
Copy link
Copy Markdown

@ciindii ciindii commented Dec 8, 2022

No description provided.

Comment thread swap_meet/clothing.py
from swap_meet.item import Item

class Clothing(Item):
def __init__(self, id=None, condition=None, fabric=None):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks good :)

Comment thread swap_meet/item.py
class Item:
pass No newline at end of file
def __init__(self, id=None, category=None, condition=None):
self.id = id if id is not None else int(uuid.uuid4())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice use of ternary operators!

Comment thread swap_meet/vendor.py
# my_item: instance of an Item, what item 'this' vendor wants to swap
# thier_item: instance of an Item, what item other_vendor wants to swap
#output: return True or False
if my_item not in self.inventory or thier_item not in other_vendor.inventory:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Way to go debugging this one ;)

Comment thread swap_meet/vendor.py

def display_inventory(self, category=''):

list_of_categories = self.get_by_category(category)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would rename to category_to_list

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