Skip to content

Commit 8c73865

Browse files
committed
Keywords can be also types derived from str
1 parent da51eea commit 8c73865

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
@@ -3348,7 +3348,7 @@ void rearrangeArguments(ParamReceiveSpec paramspec, const ParamNames* param_name
33483348
for (const auto& p : *d_kwargs) {
33493349
auto k = coerceUnicodeToStr(p.first);
33503350

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

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

0 commit comments

Comments
 (0)