2020년 8월 28일 금요일

python class 기초

 #class 기초

#클래스는 구분하기위한 용도로 맨 앞글자는 대문자로 쓴다
class B_school():
def __init__(self):
print("B클래스 입니다")

self.student_name = "원빈"

class A_school():
def __init__(self):
print("A클래스 입니다")
bb = B_school()

self.student_name_a =bb.student_name;
print(self.student_name_a)


#B_school().stock()
A_school()

댓글 없음:

댓글 쓰기

git rejected error(feat. cherry-pick)

 문제 아무 생각 없이 pull을 받지않고 로컬에서 작업! 커밋, 푸시 진행을 해버렷다. push에선 remote와 다르니 당연히 pull을 진행해라고 하지만 로컬에서 작업한 내용을 백업하지 않고 진행하기에는 부담스럽다(로컬작업 유실 가능성) 해결하려...