내부 class에 대한 질문 입니다.
262
작성한 질문수 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
loop is not defined
0
53
1
가상환경 설정이 안됩니다
0
48
1
__le__, __ge__ 관련 질문
0
47
0
atom 서비스 종료
0
60
1
atom 서비스 종료
0
57
1
진도미확인 (진도가 안 넘어감)
0
87
1
RuntimeError: There is no current event loop in thread 'MainThread'
0
132
1
chapter 07-01 실행 오류
0
109
1
Chapter05-04 : sum_func의 합이 이중 출력됩니다.
0
123
2
45. 병렬성 2 - Futures(5-1) wait가 의도된 대로 동작하지 않습니다.
0
144
2
멀티스레딩 - 44. 병렬성 1 - Futures(4-2)
0
120
2
chapter05_02 클로저 질문사항 !
0
95
1
LV1 설정
0
129
2
매직 메소드의 호출 방법 차이 문의
0
180
2
왜 numbers리스트를 만들때 str으로 숫자를 감싸나요?
0
143
2
스크랩핑 실습 중 Mac OS 인증서 문제
0
166
1
AsyncIO 멀티 스크랩핑 실습 예제 관련 질문
0
208
1
강의자료가 영상과 다릅니다
0
293
2
closure.cell_contents 초기화 하기 문의
0
177
2
map함수 사용 시, list변환 방법 문의
0
393
2
__mul__ 백터 * 숫지, 백터 * 백터 처리
0
175
1
del처리후 질문입니다.
0
211
1
car_list(car1,car2,car3) 인스턴스 tuple 타입 문의
0
264
1
coroutine에 대한 질문
0
278
1





