Skip to content
This repository was archived by the owner on Jan 4, 2020. It is now read-only.

Conversation

@jjj0611
Copy link

@jjj0611 jjj0611 commented Jan 20, 2019

2번 과제에서 txt 파일에 직접 저장해야한다고 잘못 생각해서 작성한 코드와
토요일에 새롭게 작성해본 코드 두 가지 다 올립니다.

task2_original_jaeju는 파일에 저장하는 방식을 기반으로 처음 작성했던 스크립트이고,
taks2_jaeju는 토요일 모임 후에 새로 짜본 코드입니다.
@jjj0611 jjj0611 self-assigned this Jan 20, 2019
Copy link
Contributor

@kwangilcho kwangilcho left a comment

Choose a reason for hiding this comment

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

아주 좋습니다. 앞으로 이런 식으로 코드리뷰를 받으시면 되겠습니다.
새로 작성해주신 파일에 대해서만 코드리뷰를 진행하였습니다.

print('3. 삭제하기')
print('-------------------------------------')

def action_execution(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

함수 이름은 동사로 시작하는 것이 좋습니다.
execute_action은 어떨까요?

Copy link
Author

Choose a reason for hiding this comment

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

아 그렇네요!
함수 자체의 실행적 느낌을 살려서 네이밍 해보도록 하겠습니다!

except IndexError:
print('범위 밖의 숫자를 입력하셨습니다.')

def action_list(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

함수 이름은 동사로 시작하는 것이 좋습니다.
list_actions은 어떨까요?

Copy link
Author

Choose a reason for hiding this comment

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

아 이 부분도 action_list라고 하면 action들의 리스트라는 느낌이 더 강하겠네요!
감사합니다!

if post_no < 1 or post_no > len(self.posts):
raise IndexError
del self.posts[post_no -1]
except ValueError:
Copy link
Contributor

Choose a reason for hiding this comment

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

에러 별 예외처리가 아주 좋네요!

Copy link
Author

Choose a reason for hiding this comment

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

감사합니다!

return

for index, post in enumerate(self.posts):
print('{글번호}. {글내용}'.format(글번호 = str(index + 1), 글내용 = post))
Copy link
Contributor

Choose a reason for hiding this comment

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

formatted string 활용이 돋보입니다.

Copy link
Author

Choose a reason for hiding this comment

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

감사합니다!

board.show_posts()
board.action_list()
board.action_execution()
os.system('cls' if os.name == 'nt' else 'clear')
Copy link
Contributor

Choose a reason for hiding this comment

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

clear_screen() 함수를 만들어 놓고 쓰지 않았네요.

Copy link
Author

Choose a reason for hiding this comment

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

아 그렇네요...ㅎㅎ
clear_screen 함수를 나중에 작성하고
바꾸질 못했네요
감사합니다!

@kwangilcho kwangilcho merged commit cfaf816 into kiworkshop:장재주 Jan 20, 2019
wbluke added a commit to wbluke/101 that referenced this pull request Feb 10, 2019
jjj0611 added a commit to jjj0611/101 that referenced this pull request Feb 11, 2019
jamesjahng added a commit to jamesjahng/101 that referenced this pull request Feb 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants