Skip to content

Commit c8e6f4a

Browse files
committed
Keywords can be also types derived from str
1 parent 8805f14 commit c8e6f4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime/objmodel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3347,7 +3347,7 @@ void rearrangeArguments(ParamReceiveSpec paramspec, const ParamNames* param_name
33473347
for (const auto& p : *d_kwargs) {
33483348
auto k = coerceUnicodeToStr(p.first);
33493349

3350-
if (k->cls != str_cls)
3350+
if (!isSubclass(k->cls, str_cls))
33513351
raiseExcHelper(TypeError, "%s() keywords must be strings", func_name);
33523352

33533353
BoxedString* s = static_cast<BoxedString*>(k);

0 commit comments

Comments
 (0)