내부 class에 대한 질문 입니다.
255
작성한 질문수 14
안녕하세요 강사님.
세가지 질문 있습니다.
1. class를 만들때, class명을 대문자로 쓰잖아요.
예) class Car , class Persion
근데 왜 내장 클래스들 str 은 class 인데 이름이 소문자 인가요?
class str 로 되어 있던데
2.
s = str()
print(s)
위 소스에서
str()에 포커스를 가져다 놓으면 아래 처럼 나옵니다.
class str 이라고요.
==나오는 내용==
builtins class str(Sequence[str])
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.
근데 정작 파이참에서 ctrl+click 하면
정의 부분인 class str의 __init__(self) 로 가지 않고
buitins.py 로 가는 이유는 먼가요?
읽어 주셔서 감사합니다.
답변 1
진도미확인 (진도가 안 넘어감)
0
54
1
RuntimeError: There is no current event loop in thread 'MainThread'
0
96
1
chapter 07-01 실행 오류
0
80
1
Chapter05-04 : sum_func의 합이 이중 출력됩니다.
0
91
2
45. 병렬성 2 - Futures(5-1) wait가 의도된 대로 동작하지 않습니다.
0
110
2
멀티스레딩 - 44. 병렬성 1 - Futures(4-2)
0
83
2
chapter05_02 클로저 질문사항 !
0
63
1
LV1 설정
0
96
2
매직 메소드의 호출 방법 차이 문의
0
140
2
왜 numbers리스트를 만들때 str으로 숫자를 감싸나요?
0
108
2
스크랩핑 실습 중 Mac OS 인증서 문제
0
139
1
AsyncIO 멀티 스크랩핑 실습 예제 관련 질문
0
182
1
강의자료가 영상과 다릅니다
0
264
2
closure.cell_contents 초기화 하기 문의
0
139
2
map함수 사용 시, list변환 방법 문의
0
354
2
__mul__ 백터 * 숫지, 백터 * 백터 처리
0
152
1
del처리후 질문입니다.
0
165
1
car_list(car1,car2,car3) 인스턴스 tuple 타입 문의
0
236
1
coroutine에 대한 질문
0
251
1
제너레이터 이터레이터 질문이 있습니다.
0
258
1
atom install package search not working
0
283
1
Magic Method - Not Implemented
0
409
1
가상환경 질문!
0
411
1
병렬처리 추가 질문이 있습니다.
0
255
1





