support type(b'test') -> <class 'bytes'>

This commit is contained in:
lyon 2022-04-28 16:04:14 +08:00
parent 652962c4c3
commit 876ea81576
2 changed files with 8 additions and 0 deletions

View File

@ -45,6 +45,10 @@ void PikaStdLib_SysObj_type(PikaObj* self, Arg* arg) {
obj_setSysOut(self, "<class 'meta object'>");
return;
}
if (ARG_TYPE_BYTES == type) {
obj_setSysOut(self, "<class 'bytes'>");
return;
}
if (ARG_TYPE_METHOD_NATIVE == type) {
obj_setSysOut(self, "<class 'buitin_function_or_method'>");
return;

View File

@ -45,6 +45,10 @@ void PikaStdLib_SysObj_type(PikaObj* self, Arg* arg) {
obj_setSysOut(self, "<class 'meta object'>");
return;
}
if (ARG_TYPE_BYTES == type) {
obj_setSysOut(self, "<class 'bytes'>");
return;
}
if (ARG_TYPE_METHOD_NATIVE == type) {
obj_setSysOut(self, "<class 'buitin_function_or_method'>");
return;