Skip to content

James wigdor cs30 - #2

Open
jpwigdor wants to merge 6 commits into
masterfrom
james-wigdor-cs30
Open

jpwigdor wants to merge 6 commits into
masterfrom
james-wigdor-cs30

Conversation

@jpwigdor

@jpwigdor jpwigdor commented Jun 5, 2020

Copy link
Copy Markdown
Owner

No description provided.

@jpwigdor
jpwigdor requested a review from MarkHalls June 5, 2020 21:28

@MarkHalls MarkHalls left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great work, give the stretch a try, I think you'll like it.

self.lon = lon

def __repr__(self):
return f"<City: {self.name}, lat: {self.lat}, lon: {self.lon}>"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Man, I still really like this method. It makes stuff so clean.

reader = csv.reader(csvfile)
for row in reader:
# research the `next()` function in `csv.reader` to avoid using the conditional on each line in this loop.
if row[0] != 'city':

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You might think about getting in the habit of using python keywords for comparisons. They're a lot more powerful than the symbol versions.
and, or, not, is

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